RegularExpressionAttribute::Pattern Property
Silverlight
Gets the regular expression to use for validation of the associated member.
Namespace: System.ComponentModel.DataAnnotations
Assembly: System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)
Property Value
Type: System::StringThe regular expression to use for validation of the associated member.
The value of the property is not tested against the pattern when the property contains nullptr or an empty string ("").To validate that the value is not nullptr or an empty string, use the RequiredAttribute attribute.
The following examples show how to apply the RegularExpressionAttribute attribute to a property that contains values for a last name.
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
Community Additions
ADD
Show: