Class MaxLengthValidationRuleAttribute
- Namespace
- Kentico.Xperience.Admin.Base.FormAnnotations
- Assembly
- Kentico.Xperience.Admin.Base.Shared.dll
Validation rule attribute to validate whether value satisfies the maximal length limit.
public class MaxLengthValidationRuleAttribute : ValidationRuleAttribute
- Inheritance
-
objectAttributeMaxLengthValidationRuleAttribute
- 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 MaxLength value;
Constructors
MaxLengthValidationRuleAttribute(int)
Creates new instance of MaxLengthValidationRuleAttribute.
public MaxLengthValidationRuleAttribute(int maxLength)
Parameters
maxLength
intMaximal allowed length.
Properties
MaxLength
Maximal allowed length.
public int MaxLength { get; }
Property Value
- int