我使用BootStrapValidator.js在ASP中进行表单验证,但我没有验证电子邮件正则表达式,导致MVC返回输入name=" email“,当我编辑输入框名称属性为"email”时,验证器在name = "email“上工作。@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 helper,则将其更改为"Email”,没有区别。
https://stackoverflow.com/questions/51341640
复制