diff --git a/xml/System.ComponentModel.DataAnnotations/RegularExpressionAttribute.xml b/xml/System.ComponentModel.DataAnnotations/RegularExpressionAttribute.xml index 02aa0b5c10a..96d3f22f0cc 100644 --- a/xml/System.ComponentModel.DataAnnotations/RegularExpressionAttribute.xml +++ b/xml/System.ComponentModel.DataAnnotations/RegularExpressionAttribute.xml @@ -50,27 +50,27 @@ Specifies that a data field value in ASP.NET Dynamic Data must match the specified regular expression. - attribute to validate the FirstName and LastName data fields. The regular expression allows up to 40 uppercase and lowercase characters. The example performs the following tasks: +The following example shows how to use the attribute to validate the FirstName and LastName data fields. The regular expression allows up to 40 uppercase and lowercase characters. The example performs the following tasks: + - Implements a metadata partial class and the associated metadata class. - - In the associated metadata class, applies the attribute to the FirstName and LastName data fields, specifying the pattern and custom error messages. - :::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.RegularExpressionAttribute/CS/Customer.cs" id="Snippet1"::: - :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.RegularExpressionAttribute/VB/Customer.vb" id="Snippet1"::: +:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.RegularExpressionAttribute/CS/Customer.cs" id="Snippet1"::: +:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/System.ComponentModel.DataAnnotations.RegularExpressionAttribute/VB/Customer.vb" id="Snippet1"::: ]]> + .NET regular expressions