Click here to Skip to main content
14,929,864 members

1 solution

You only need to decorate the fields with attributes for email for example you could specify the email as follows.

C#
[Required(ErrorMessage = "Please indicate email")]
        [RegularExpression(".+\\@.+\\..+",
        ErrorMessage = "Please indicate valid email")]
        public string Email { get; set; }
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900