RegularExpressionValidator Class
Collapse the table of content
Expand the table of content

RegularExpressionValidator Class

Provides control capability to validate that another control's value matches a provided regular expression.

Namespace: System.Web.UI.MobileControls
Assembly: System.Web.Mobile (in

public class RegularExpressionValidator : BaseValidator
public class RegularExpressionValidator extends BaseValidator
public class RegularExpressionValidator extends BaseValidator

This class behaves identically to the ASP.NET System.Web.UI.WebControls.RegularExpressionValidator control.

By default, Command controls on a form raise validator controls on the form to perform validation when the form is submitted to the server. To disable automatic validation, set the CausesValidation property on the Command to false.

The following example shows how you can add regular expression properties, such as the ValidationExpression and Text properties, programmatically during a page load.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1

Community Additions

© 2016 Microsoft