Hi, I'm developing and asp.net app and i'm using data annotations to validate my Input model. In this model, I have one field of type DateTime, and I'd like to know how could I customize the message when the user set an date value invalid.
My property in my model:
[Required(ErrorMessage = "Informe sua data de nascimento.")]
[MinAge(Idade = 18, ErrorMessage = "Você deve possuir no mínimo 18 anos para se cadastrar neste website.")]
public virtual DateTime DataNascimento { get; set; }
My model is thowing a message like this: "The value '45/64/5646' is not valid for DataNascimento."
If you could help me I appretiate!
PS: The messages of validators are in pt-br (because it'll be the language of the application)
Thanks a lot