Class MaximumDecimalValueValidationRuleAttribute
- Namespace
- Kentico.Xperience.Admin.Base.FormAnnotations
- Assembly
- Kentico.Xperience.Admin.Base.Shared.dll
Validation rule attribute to validate whether value satisfies the maximum value.
public sealed class MaximumDecimalValueValidationRuleAttribute : ValidationRuleAttribute
- Inheritance
-
objectAttributeMaximumDecimalValueValidationRuleAttribute
- Inherited Members
- Extension Methods
Remarks
Error message defined by ErrorMessage supports substitution macro {0} in the error message text. The substitution macro will be replaced by MaxValue value;
Constructors
MaximumDecimalValueValidationRuleAttribute(double)
Creates new instance of MaximumDecimalValueValidationRuleAttribute.
public MaximumDecimalValueValidationRuleAttribute(double maxValue)
Parameters
maxValue
doubleMaximum value.
Remarks
This constructor rounds value to 15 significant digits using rounding to nearest. This is done even if the number has more than 15 digits and the less significant digits are zero.
Exceptions
- OverflowException
maxValue
is greater than decimal.MaxValue or less than decimal.MinValue.
Properties
MaxValue
Maximum value.
public decimal MaxValue { get; }
Property Value
- decimal