What should the modelName parameter for Validate() be?
Pass the same thing you would have passed to ValidationMessage() or ValidationMessageFor(). So <%= Html.ValidatrFor(model=>model.customer.CustomerName) %>, etc.
Marked as answer by ricka6 on Feb 12, 2010 01:13 AM
levib
Star
7702 Points
1099 Posts
Microsoft
Re: MVC 2 RC2 Clientside validation: Html.ValidationMessageFor() required even if using DataAnnot...
Feb 11, 2010 04:52 PM|LINK
Pass the same thing you would have passed to ValidationMessage() or ValidationMessageFor(). So <%= Html.ValidatrFor(model=>model.customer.CustomerName) %>, etc.