Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL

Chapter 40. The System.Web.UI.MobileCont... > RegularExpressionValidator


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 it won't render client-side validation code).

public class RegularExpressionValidator : BaseValidator {
// Public Constructors
   public RegularExpressionValidator( );
// Public Instance Properties
   public string ValidationExpression{set; get; }
// Protected Instance Methods
   protected override BaseValidator CreateWebValidator( );        // overrides BaseValidator
   protected override bool EvaluateIsValid( );       // overrides BaseValidator



You are currently reading a PREVIEW of this book.


Get instant access to over $1 million worth of books and videos.


Start a Free 10-Day Trial

  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint