It looks like there's an issue in MVC 2 RC1 if you want to use jQuery.Validate but not the main Microsoft AJAX - which is 25kb even when gzipped.
According to Phil Haack you're supposed to be able to just include these scripts:
<script src="/Scripts/jquery-1.3.2.js" type="text/javascript"></script> <script src="/Scripts/jquery.validate.js" type="text/javascript"></script> <script src="/Scripts/MicrosoftMvcJQueryValidation.js" type="text/javascript">
Unfortunately in some reorganization they did between Beta and RC - you also now need to include MicrosoftAjax.js
which defines the Type
prototype functions that are used by MicrosoftMvcJQueryValidation.js
(the first line is Type.registerNamespace('Sys.Mvc');
which is defined in MicrosoftAjax.js
)
Has anyone already extracted out the necessary code from MicrosoftAjax.js
that is needed? I'll have to do it sooner or later but if anyone has already done it that would help a lot!