Hi,
You can easily use the regular expression attribute and set the expression inside that attribute and it should be on top of a property of a class.
[RegularExpression ("[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,}$", ErrorMessage = "Invalid Email")]
public string Email { get; set; }
Cheers,
Jin