Scott Gu wrote an excellent article explaining how to apply the Data Annotation validation in ASP.NET MVC 2. I have implemented the items in this article for the server-side work, and it works well. I get back error messages when there is a problem.
I tried to add the code to also hook in client-side error messages (so a message is displayed when I tab out of a field that violates the rules), but, unfortunately, this does not appear work. I want to provide more information for my question, but I'm not even sure where to debug where my problem is at the moment. How can I do that?
To describe my site layout:
Site.Master - The Html.EnableClientValidation() call is here.
Index.aspx - Contains code to turn partial pages into a tab via jQuery UI tabs.
PartialPage1.ascx - Contains the fields that I want validated.
PartialPage2.ascx - Contains the fields that I want validated.
Any help or suggestions on where/how to start the debugging process would be much appreciated. Thank you.