Class MinimumLengthValidationRule
Rule validates that user input value is not shorther than specified value.
[Obsolete("This is a legacy validation rule for form fields that will eventually become unsupported. Implement migration to preserve validation rule configurations.")]
public class MinimumLengthValidationRule : ValidationRule<string>
- Inheritance
-
objectValidationRule<string>MinimumLengthValidationRule
- Inherited Members
- Extension Methods
Constructors
MinimumLengthValidationRule()
public MinimumLengthValidationRule()
Properties
MinimumLength
Minimum length user input is validated against.
[EditingComponent("Kentico.IntInput", Label = "{$kentico.formbuilder.validationrule.minimumlength.minimumlength.label$}")]
[Required]
public int MinimumLength { get; set; }
Property Value
- int
Methods
GetTitle()
Gets a title for this instance of validation rule such as 'Minimum length is 100'.
public override string GetTitle()
Returns
- string
Returns text describing the validation rule.
Validate(string)
Validates the form component's value and returns true if it is longer or equal to the MinimumLength.
protected override bool Validate(string value)
Parameters
valuestringValue of the form component.
Returns
- bool
trueif the value is valid, otherwise false.