Xval 和比较运算符?

发布于 2024-07-30 19:13:12 字数 165 浏览 2 评论 0原文

我在网站上读到,xVal 0.8 版本支持

“支持比较验证器(例如,“PasswordConfirm”必须等于“Password”)”

,但我没有看到有关如何执行此操作的教程。 我正在尝试比较 2 个密码,但甚至不知道从哪里开始。

有人可以告诉我该怎么做吗?

I read on the site that version 0.8 of xVal supports

"Support for comparison validators (e.g., “PasswordConfirm” must equal “Password”)"

Yet I see no tutorial on how to do this. I am trying to compare 2 passwords yet don't even know where to start.

Can someone show me how to do this?

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

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

发布评论

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

评论(1

行雁书 2024-08-06 19:13:12

Codeplex 上有一些关于比较验证器的讨论。 一月份有人说这还不可能,然后六月份说你可以使用自定义验证器。

一月:CompareTo 验证属性

六月:使用 DataAnnotations 时如何使用 ComparisonRule

如果不出意外,它可能会为您指明正确的方向。

There are a couple of discussions on codeplex about comparison validators. One in January saying that is was not yet possible and then in June saying you can use custom validators.

January: CompareTo Validation Attribute

June: How do I use the ComparisonRule when using DataAnnotations

If nothing else it might point you in the right direction.

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