xval 与 MVC 3.0 验证

发布于 2024-09-30 05:16:53 字数 207 浏览 0 评论 0原文

我想知道是否有人对 xVal 或 MVC 3.0 模型验证的使用有任何意见?我最初开始使用 xVal 是因为它能够验证客户端和服务器端,但该项目似乎已经死了(也许休眠是一个更好的词),而且 MVC 2.0 和 3.0 中的验证似乎有了很大的改进。与 MVC3.0 验证相比,使用 xval 有何优势(如果有的话),反之亦然?

欢迎任何建议,

谢谢

JP

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

a√萤火虫的光℡ 2024-10-07 05:16:53

我认为在 MVC 3.0 中使用 xVal 与内置支持相比没有任何优势。 xVal 的创建者甚至在他们的主页上这样说:xVal 的 CodePlex 网站

重要提示:建议使用xVal
仅适用于 ASP.NET MVC 1.0

如果您使用的是 ASP.NET MVC 2.0 或
后来,框架内置了
支持生成客户端
直接来自模型的验证逻辑
元数据。如果出现以下情况,您仍然可以使用 xVal:
你希望,但不会主动
开发或支持。

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.

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