by Stian

jQuery validation not working in IE7 and IE8

jqueryWhen you create a new ASP.NET MVC 3 Project in Visual studio, your script folder will by default contain among others:

jquery-1.5.1.min.js
jquery.validate.min.js (which is version 1.8.0)

One of the first things you might want to do is update the jquery version to the latest version, which today is version 1.7.1

After doing this, your client side validation will stop working in Internet Explorer 7 and Internet Explorer 8.

This is because the jquery.validate version is not compatible with jquery versions > 1.6. The solutions is simple, you need to update your version of jquery.validate as well. You can find the current version 1.9 from Microsoft’s CDN or the latest version from GitHub here:

Microsoft Ajax CDN: http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js
GitHub Jquery Validation: https://github.com/jzaefferer/jquery-validation/downloads

Remember that you can always find the latest javascript library in Microsofts CDN, see the complete list of available libraries here: http://www.asp.net/ajaxlibrary/cdn.ashx

Comments

4 Comments
Muchacho Espiador Says:

You are correct, that was my problem when everything was working fine in Chrome but not when using IE8. I did a new update from the Package Manager Console and started working after that. Thanks for your help.

Hagge Says:

Thanks, was experience just this issue. -Could not understand what was causing it.

Jerin Says:

Very good . You save my minimum 3 hrs.Thank you

Betty Says:

Thank you very much, after 6 hours of searching, I finally found a solution.