I have following model:
public class FormularModel
{
[Required]
public string Position { get; set; }
[Required]
[DataType(DataType.EmailAddre
I have looked at the source code (reverse engineered by Reflector) and DataType variants are actually not even implemented! (This was for DateType.Date)
So it is not going to work.
I would personally use RegexValidation for email.
For clarity, here is the implementation of IsValid in class DataTypeAttribute:
public override bool IsValid(object value)
{
return true;
}