RegularExpressionAttribute Constructor (String)
Initializes a new instance of the RegularExpressionAttribute class.
Assembly: System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)
The following example shows how to apply the RegularExpressionAttribute to a data field. If validation fails, the code in the example displays the validation error message that is provided by Dynamic Data.
Available since 8
Available since 3.5
Portable Class Library
Supported in: portable .NET platforms
Available since 3.0