【发布时间】:2018-12-22 19:26:12
【问题描述】:
我在 ASP MVC 中使用 BootStrapValidator.js 进行表单验证,但我不验证电子邮件正则表达式导致 MVC 返回输入名称 =“电子邮件”,当我将输入框名称属性编辑为“电子邮件”时,验证器在名称 =“电子邮件”上工作“它工作正常。@Html.TextBoxFor(u => u.Email, new { placeholder = "sample@domain.com", @class = "form-control", id = "Email",type="email" })
检查结果
<input class="form-control" id="Email" placeholder="sample@domain.com" value="" name="Email" type="email">
如果我将 name="email" 添加到 @html 帮助程序,它会更改为 "Email"
【问题讨论】:
标签: ajax asp.net-mvc validation twitter-bootstrap-3