With VS2010’s default MVC3 project template, jQuery version is 1.5.1 and it works fine to support Unobtrusive Validation.
Today I downloaded jQuery 1.7.1 to replace 1.5.1 and Unobtrusive Validation stopped working. The JS files I have in my project are:
- jquery-1.5.1.min.js/jquery-1.7.1.min.js
- jquery.validate.min.js
- jquery.validate.unobtrusive.min.js
I deleted all other JS files.
The only difference in my code is to choose different version of jQuery.
Anybody else experienced same issue?
According to the author’s site, it’s only verified to be working with up to jQuery 1.6.1. Though I use 1.6.4 currently with no noticeable problems, it would not surprise me if 1.7.* has breaking changes that need to be accounted for before the unobtrusive validation works with it. I haven’t upgraded to 1.7.1 yet (or rather I did, and have since rolled back), because when I tried 1.7 I ran into other compatibility issues with Telerik’s MVC controls.
Edit: I just noticed the link I tracked down was for the validation plugin not the unobtrusive validation plugin. Unless the most recent versions still has an issue with it, I can only suggest that you wait until they make the necessary adjustments before upgrading to 1.7.*
Edit: Also, I made a comment below but you may want to try the Nuget package and see if this helps resolve your problem, I have no issues with this now. http://nuget.org/packages/Microsoft.jQuery.Unobtrusive.Validation