In register form I use EmailAddress attribute to validate user email.
public class RegisterViewModel
{
[Required(ErrorMessage = "Pole wymagane")]
[Display(Name = "Email")]
[DataType(DataType.EmailAddress)]
[EmailAddress]
public string Email { get; set; }
}
Is there any chance to show what is wrong with email address if validation fails? For example 'oops, I see that your email address contains whitespace'