views:

75

answers:

1

There seems to be some confusion, at least for myself, on client side validation using the data annotations framework and

<% Html.EnableClientValidation(); %>  

Most of the examples I have seen like on haacked.com use the following scripts

jquery.validate.js

MicrosoftMvcJqueryValidation.js

However, visual studio 2010 asp.net mvc 2 project doesn't include the MicrosoftMvcJqueryValidation.js

Instead, I was able to get some client validation working using

MicrosoftAjax.js

MicrosoftMvcValidation.js

Does anyone know why two different ways are supported for doing client-side validation and why both options are not present in visual 2010?

+1  A: 

Client side validation in ASP.NET MVC is extensible (specifically section called Validation using jQuery Validation?).

MicrosoftMvcJqueryValidation.js is an adapter that let's you use jQuery validation with ASP.NET MVC, it doesn't look like it's the default validation framework out of the box though (that's what the other JS validation files are).

R0MANARMY