Validating email in javascript using regular expression

aspdotnet-suresh offers C#articles and tutorials,csharp dot net,articles and tutorials, VB.

Now you can ask questions directly to me on my new site ASPForums.

Finally, the [Regular Expression] attribute checks whether a property value matches a pattern as specified by a regular expression.

validating email in javascript using regular expression-88validating email in javascript using regular expression-86

It is not yet linked with the User Profile model class.

Notice the attributes that are used to decorate these properties.

The [Display Name] attribute is used to specify a friendly name for the property under consideration.

Since the data model class is automatically created for you by the Visual Studio designer it is not recommended to modify the same class file.

The recommended approach is to create a metadata class and decorate its properties with data annotation attributes. Add a new class in the Models folder and name it User Profile Metadata.

Validating email in javascript using regular expression