xval vs MVC 3.0 validations

守給你的承諾、 提交于 2019-12-11 07:44:08

问题


I was wondering if anyone has any opinions regarding the usage of xVal or MVC 3.0 model validation? I originally started using xVal because of its ability to validate both client and server side but the project appears to be dead (perhaps dormant is a better word) and it appears that validation in MVC 2.0 and 3.0 has greatly improved. What are the advantages, if any, to using xval over MVC3.0 validation and vice versa?

Any advice is appreciated,

Thank you

JP


回答1:


I think there is no advantage of using xVal for MVC 3.0 over the built-in support. The creators of xVal even say this on their homepage: xVal's CodePlex site:

Important: xVal is recommended for use only with ASP.NET MVC 1.0

If you're using ASP.NET MVC 2.0 or later, the framework has built-in support for generating client-side validation logic directly from model metadata. You can still use xVal if you wish, but it won't be actively developed or supported.



来源:https://stackoverflow.com/questions/4093325/xval-vs-mvc-3-0-validations

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!