I’m using the client validation function of the MVC 2.0 framework
(with Html.ValidationMessageFor() and Html.EnableClientValidation()).
Everything is nice, when I use the validation in a simple form.
But when I get this form via jQuery Ajax
$.get('PathToMyForm', function(htmlResult) {
$('selector').html(htmlResult);
});
client validation doesn’t work. Why?
I’ve had problems with MVC validation and partial views too. I sorted it out by using jquery.validate.js instead of the build-in client-validation. You can try that out.