Validation Controls[3]->RegularExpressionValidator
The RegularExpressionValidator control confirms that the entry matches a pattern defined by a regular expression. This type of validation allows you to check for predictable sequences of characters, such as those in social security numbers, e-mail addresses, telephone numbers, postal codes, and so on.
RegularExpressionValidator uses two key properties to perform its validation: ControlToValidate contains the value to validate, and ValidationExpression contains the regular expression to match.
The following sample illustrates using the RegularExpressionValidator control.
For a detailed discussion of Web Forms validation, please see the Validating Form Input Controls section of this QuickStart tutorial.
RegularExpressionValidator uses two key properties to perform its validation: ControlToValidate contains the value to validate, and ValidationExpression contains the regular expression to match.
The following sample illustrates using the RegularExpressionValidator control.
For a detailed discussion of Web Forms validation, please see the Validating Form Input Controls section of this QuickStart tutorial.


浙公网安备 33010602011771号