I can\'t seem to get any client side validation working on a MVC 2 RC app.
My model has the following:
public class ExampleModel
{
[Required(Erro
When you update project from MVC 2 Beta, use: /src/MvcFutures/MicrosoftMvcJQueryValidation.js from MVC 2 RC Source Code Package (link). Older Beta version do not work correctly with jquery.validation in RC. Needed javascript files are:
Right version of MicrosoftMvcJQueryValidation.js contains this $(document).ready() function:
// need to wait for the document to signal that it is ready
$(document).ready(function() {
var allFormOptions = window.mvcClientValidationMetadata;
if (allFormOptions) {
while (allFormOptions.length > 0) {
var thisFormOptions = allFormOptions.pop();
__MVC_EnableClientValidation(thisFormOptions);
}
}
});
at the end of file (in RC release).