LengthValidator Control
Description
The LengthValidator validates that the length of a TextBox is within a certain range. You may enter a value for the minimum, maximum, or both lengths. You are also given the option of having an error message that states the minimum and maximum lengths generated.
Example


The following tags were used to create the validators used in the three examples above:

Properties & Methods
LengthValidatorThe LengthValidator is used to validate the minimum and/or maximum number of characters in a TextBox.
  • MaximumLength - The maximum number of characters allowed in the specified TextBox
  • MinimumLength - The minimum number of characters allowed in the specified TextBox
  • GenerateErrorMessage - Specifies whether a custom or generated error message should me used (default="True")
Source Code
LengthValidator.vb:

Remarks
The LengthValidator can be used to specify a minimum and/or maximum number of characters.