I am trying to validate that an email address entered by the user is a valid email address. I have tried to use the following data annotation which I read should work:
[Required]
[DataType(DataType.EmailAddress)]
[DisplayName("Email Address")]
public string Email { get; set; }
So as you can see I have used the [DataType(DataType.EmailAddress)]. This does not seem to work. Is there any other method that I can use to check that an email address is valid. I have spent the last 108 hours working on this and I feel that it is about time I move on.