我正在使用materializecss
插件来构建我的界面。我正在尝试将文本框验证为电子邮件输入,但是当我点击Tab
按钮时出现以下问题:
控制器:
[Required(ErrorMessage = "You need to type your e-mail address!"), DisplayName("E-mail address")]
[StringLength(64)]
[EmailAddress(ErrorMessage = "This is not a valid e-mail address!")]
public string ACC_MADDR { get; set; }
HTML:
@Html.TextBoxFor(model => model.ACC_MADDR, new { id = "reg_email", @class = "validate", autocomplete = "off", maxlength = "64", required = "required", data_length = 64, @type = "email" })
@Html.LabelFor(model => model.ACC_MADDR, new { data_error = @Html.ValidationMessageFor(model => model.ACC_MADDR) })