asp.net mvc 2 中的 DataAnnotations jQuery 验证

发布于 2024-09-03 21:44:59 字数 224 浏览 7 评论 0原文

我尝试在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

长途伴 2024-09-10 21:44:59

正确!我也有同样的问题。

我已经为您输入了一个非常好的长回复,其中包含各种嵌入式超链接,但 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

画中仙 2024-09-10 21:44:59

可以使用 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."

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文