How do I make Html.ValidationMessageFor work on two properties?

Posted by Dalze on Stack Overflow See other posts from Stack Overflow or by Dalze
Published on 2010-03-25T18:10:32Z Indexed on 2010/03/25 18:13 UTC
Read the original article Hit count: 249

Filed under:
|

Currently I have a custom attribute that targetted to a class like so:

[PropertiesMustMatch("Password", "PasswordConfirm", ErrorMessage = "Passwords must match!")]

The problem is that in only shows up on the validation summary, and does not highlight the incorrect textboxes. Is there a way to do that?

© Stack Overflow or respective owner

Related posts about asp.net-mvc

Related posts about validation