Is it possible to use the new client side validation features of asp.net MVC 2 without having to use the MS scripts (MicrosoftAjax.js, MicrosoftMvcAjax.js, MicrosoftMvcValidation.js)?
I use JQuery throughout my application; JQuery has a great plugin for validation and I don't really want to force my users to load MS scripts just for validation.
Is this possible? If so, any suggestions for how to accomplish it are appreciated.
Here's what you need on the client:
<script src="/Scripts/jquery-1.4.2.min.js" type="text/javascript" />
<script src="/Scripts/jquery.validate.min.js" type="text/javascript" />
<script src="/Scripts/MicrosoftMvcJQueryValidation.js" type="text/javascript" />
So no, you don't need the files in your question...and you're definitely taking the right route keeping it from being bloated. Just by using the scripts listed above instead of the default ones, validation should be all setup. (MicrosoftMvcJQueryValidation.js
hooks up to the JSON MVC2 dumps in the page)
Phil Haack has a good post explaining it more in-depth here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With