Table of Contents

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
object
Attribute
MaximumDecimalValueValidationRuleAttribute
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)

public MaximumDecimalValueValidationRuleAttribute(double maxValue)

Parameters

maxValue double

Maximum 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