简体   繁体   English

ASP.NET MVC 2中的DataAnnotations jQuery验证

[英]DataAnnotations jQuery validation in asp.net mvc 2

I trying to use jQuery validation plugin with DataAnnotations in asp.net mvc 2 final. 我试图在ASP.NET MVC 2 Final中使用带有DataAnnotations的jQuery验证插件。 Now I'm using MicrosoftMvcValidation.js and it works. 现在,我正在使用MicrosoftMvcValidation.js,它可以正常工作。 But I can't find way to work with jQuery validation. 但是我找不到使用jQuery验证的方法。 I read about MicrosoftMvcJQueryValidation.js. 我读了有关MicrosoftMvcJQueryValidation.js的文章。 But I think that it is obsolete. 但是我认为它已经过时了。 How can I use DataAnnotations with jQuery validation plugin? 如何在jQuery验证插件中使用DataAnnotations?

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. 我为您键入了一个非常不错的长回复,其中包含各种嵌入式超链接,但是由于我的信誉不够,stackoverflow不会让我为您发布它。 Kinda chicken-and-egg... 金田鸡肉和鸡蛋...

So, look here: http://aspnet.codeplex.com/releases/view/41742 因此,请看这里: http : //aspnet.codeplex.com/releases/view/41742

Shannon 香农

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 : 可以使用Mvc期货,但以下是ASP.NET MVC团队高级开发人员 在另一个论坛 上的评论

"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." “我们最初使用jQuery Validation走了一条路,发现它不完全符合我们的需求,因此我们停止了对它的开发,然后将其移至Futures。我们不支持它,而仅将其包含在内,因为它存在于临时版本中必须使用MVC 2才能使用。”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM