Field of type type="email" scorn ValidationMessageFor asp.net mvc?

1

When using this type of field, it ignores ValidationMessageFor ?

In class

[Required(ErrorMessage = "Informe o seu login.")]
[DataType(DataType.EmailAddress, ErrorMessage = "Por favor insira ...")]
[StringLength(50, ErrorMessage = "O número de caracteres permitidos é 50.")]
public string login { get; set; }

In the form

@Html.TextBoxFor(x => x.login, new { placeholder = 
     @Projeto.WEB.Celular.Resources.HomeText.txtRecuperaSenha, 
     @class = "form-control input-lg", type = "email", })
@Html.ValidationMessageFor(x => x.login)

    
asked by anonymous 25.06.2017 / 02:44

0 answers