How can I disable a form's submit button if there are DataAnnotation validation errors?
问题 I've attempted binding to the change event of all inputs in the form, and checked to see if there are any validation messages on the page. The problem is that validation seems to occur after the change event, so I am checking before the errors appear on the page. I'm looking for some way to run my script after the client-side validation takes place. I'm using MVC 2 with DataAnnotation attributes on my VM. 回答1: Here's something I just hacked together that wraps the original parseElement and