asp.net mvc 2 中的 DataAnnotations jQuery 验证
我尝试在 asp.net mvc 2 Final 中将 jQuery 验证插件与 DataAnnotations 一起使用。现在我正在使用 MicrosoftMvcValidation.js 并且它可以工作。但我找不到使用 jQuery 验证的方法。我读到了有关 MicrosoftMvcJQueryValidation.js 的内容。但我认为它已经过时了。如何将 DataAnnotations 与 jQuery 验证插件一起使用?
I trying to use jQuery validation plugin with DataAnnotations in asp.net mvc 2 final. Now I'm using MicrosoftMvcValidation.js and it works. But I can't find way to work with jQuery validation. I read about MicrosoftMvcJQueryValidation.js. But I think that it is obsolete. How can I use DataAnnotations with jQuery validation plugin?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正确!我也有同样的问题。
我已经为您输入了一个非常好的长回复,其中包含各种嵌入式超链接,但 stackoverflow 不允许我为您发布它,因为我没有足够的声誉。有点像先有鸡还是先有蛋……
所以,看这里:
http://aspnet.codeplex.com/releases/view/41742
香农
Right-on! I have exactly this same question.
I had typed up a very nice long reply with all sorts of embedded hyperlinks for you, but stackoverflow won't let me post it for you because I don't have enough reputation. Kinda chicken-and-egg...
So, look here:
http://aspnet.codeplex.com/releases/view/41742
Shannon
可以使用 Mvc Futures 但下面是备注 另一个论坛,来自 ASP.NET MVC 团队的高级开发人员 :
“我们最初选择了 jQuery Validation,发现它不太符合我们的需求,所以我们停止了它的开发并将其转移到 Futures 中。我们不支持它,只是因为它是临时存在的而被包含在内。 MVC 2 的构建。它肯定需要做很多工作才能可用。”
It's possible using the Mvc Futures but below is a remark in another forum from a Senior developer on the ASP.NET MVC team:
"We went down the path with jQuery Validation originally and found it didn't quite fit our needs, so we stopped development on it and moved it into Futures. It's not something that we support and is only included because it was present in interim builds of MVC 2. It will definitely need a lot of work to be usable."