System.Web
1.0.5000.0
2.0.0.0
Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details.
System.Web.UI.WebControls.BaseValidator
System.Web.UI.ToolboxData("<{0}:RegularExpressionValidator runat="server" ErrorMessage="RegularExpressionValidator"></{0}:RegularExpressionValidator>")
The control checks whether the value of an input control 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 e-mail addresses, telephone numbers, and postal codes.
Validation succeeds if the input control is empty. If a value is required for the associated input control, use a control in addition to the control.
Both server-side and client-side validation are performed unless the browser does not support client-side validation or client-side validation is explicitly disabled (by setting the property to false).
The regular-expression validation implementation is slightly different on the client than on the server. On the client, JScript regular-expression syntax is used. On the server, syntax is used. Since JScript regular expression syntax is a subset of syntax, it is recommended that JScript regular-expression syntax be used in order to yield the same results on both the client and the server.
When you use the control inside an control, make sure that the validator control and the control it is associated with are in the same panel. For more information about using the control for partial-page updates, see Partial-Page Rendering Overview.
For additional information about validation controls, see . For more information on regular expressions, see .NET Framework Regular Expressions.
Accessibility
For information about how to configure this control so that it generates markup that conforms to accessibility standards, see Accessibility in Visual Studio 2010 and ASP.NET 4 and ASP.NET Controls and Accessibility.
Validates whether the value of an associated input control matches the pattern specified by a regular expression.
Constructor
To be added
Initializes a new instance of the class.
1.0.5000.0
2.0.0.0
Method
System.Void
a
To be added
Adds to the specified object the HTML attributes and styles that need to be rendered for the control.
1.0.5000.0
2.0.0.0
Method
System.Boolean
To be added
Indicates whether the value in the input control is valid.
true if the value in the input control is valid; otherwise, false.
1.0.5000.0
2.0.0.0
Property
System.String
To be added: an object of type 'string'
Use this property to specify the pattern used to check for predictable sequences of characters, such as those in social security numbers, e-mail addresses, telephone numbers, and postal codes.
The does not perform validation on an empty string. If the string you are testing might be empty, use the as well as the .
For more information on regular expressions, see .NET Framework Regular Expressions.
If you experience problems with pattern matching constructs, try wrapping the expression with "^(" and ")$". For example, "a|ab" becomes "^(a|ab)$".
This property cannot be set by themes or style sheet themes. For more information, see and ASP.NET Themes Overview.
Gets or sets the regular expression that determines the pattern used to validate a field.
1.0.5000.0
2.0.0.0
System.ComponentModel.Editor("System.Web.UI.Design.WebControls.RegexTypeEditor, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(System.Drawing.Design.UITypeEditor))
System.ComponentModel.DefaultValue("")
System.Web.UI.Themeable(false)