
RegularExpressionValidator | 781
MobileControls
Namespace
This is the Title of the Book, eMatter Edition
Copyright © 2008 O’Reilly & Associates, Inc. All rights reserved.
Validation automatically succeeds if the input control is empty. To require a value, use
the RequiredFieldValidator control in addition to the RangeValidator control (although it won’t
render client-side validation code).
Hierarchy
System.Object ➝ System.Web.UI.Control(System.ComponentModel.IComponent, System.
IDisposable, System.Web.UI.IParserAccessor, System.Web.UI.IDataBindingsAccessor)
➝
MobileControl(System.Web.UI.IAttributeAccessor) ➝ TextControl ➝ BaseValidator(System.
Web.UI.IValidator)
➝ RangeValidator
RegularExpressionValidator
System.Web.UI.MobileControls (system.web.mobile.dll)
.NET 1.1, disposable
class
The RegularExpressionValidator is a type of validation control that compares an input control
against a pattern specified in the ValidationExpression. Regular expression validation is
ideally suited for verifying predictable sequences of characters, such as those in social
security numbers, email addresses, telephone numbers, and postal codes. Validation
will succeed if the input control is empty, unless you also use a RequiredFieldValidator
control. In this way, the RegularExpressionValidator control works identically to the System.
Web.UI.WebControls.RegularExpressionValidator control for full-fledged web pages (although ...