ASP.NET MVC3 比较验证器不工作
我已经设置了用于比较密码的比较属性,如 this 博客。 但这不起作用。当我用谷歌搜索它时,我发现这是 jquery.validate.js 文件中的一个已知错误。
我尝试了上面链接中给出的解决方案,但没有成功。
I have set compare attribute for comparing passwords as explained in this blog.
But it's not working. When I googled about it I found that it's a known bug in jquery.validate.js file.
Is the Compare Validator Bugged
I tried the solutions given in above links but no success.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
描述
您正在混合服务器端和客户端。 DataAnnotation 属性
CompareAttribute
仅适用于服务器端。但是您可以使用 jQuery 验证插件获得类似的功能。
示例
更多信息
查看这两个教程。
Description
You are mixing server and client side. The DataAnnotation Attribute
CompareAttribute
works only on server side.But you can get similar functionality using the jQuery validation plugin.
Sample
More Information
Check out theese two tutorials.