I have set compare attribute for comparing passwords as explained in this blog.
But it’s not working. When I googled about it I found that it’s a known bug in jquery.validate.js file.
Is the Compare Validator Bugged
I tried the solutions given in above links but no success.
Description
You are mixing server and client side. The DataAnnotation Attribute
CompareAttributeworks only on server side.But you can get similar functionality using the jQuery validation plugin.
Sample
More Information
Check out theese two tutorials.