源码:
@Html.TextBox("Email", "", new { @class = "validate[required,email] input_field_01" }) (失败!)
但是支持回调验证!
@Html.TextBox("Email", "", new { @class = "validate[required,funcCall[RegisterHelper.checkEmail]] input_field_01" })
看来只有曲线救国了!
2014-06-04解决方案:
@Html.TextBox("Email", "", new { @class = "validate[required,custom[email]] input_field_01" })
本文探讨了在ASP.NET中实现邮箱验证的方法。作者最初尝试使用内置的email验证属性失败,但成功通过自定义验证及回调函数实现了目标。最终采用了一种曲线救国的方式,即通过设置自定义验证规则来完成邮箱格式的校验。
5105

被折叠的 条评论
为什么被折叠?



