Tuesday, April 16, 2013

Error in jQuery Validation after upgrading to jQuery 1.9

After upgrading my ASP.NET MVC 4 project to jQuery 1.9, I started to get into trouble the moment I called jquery.validate.js.


This is the error message I got:

0x800a138f - JavaScript runtime error: Unable to get property 'call' of undefined or null reference

How can you fix this issue?

It seems that the introduction of jQuery 1.9 breaks the compatibility with the default jQuery.validation library(that is part of the ASP.NET MVC template). The guys of the jQuery.validation library are aware of the issue and already fixed in a new release of their library available on NuGet: http://nuget.org/packages/jQuery.Validation/.

So if you upgrade your web application to jQuery 1.9, don’t forget to also upgrade jQuery.validation to at least version 1.11.0.


sumits page said...

awesome, worked like a charm. Was stuck on this issue for a while. Thanks for sharing

sandesh daddi said...

Thanks a lot, awesome it worked smooth

SevZ said...

With MSIE 11 if you already have recent versions of jquery and you're experiencing this issue, make sure that you include jquery.validate.js just once that did the trick for me.

Anonymous said...

can be resolved by adding this line on Jquery document.ready function.
$(function () {
jQuery.event.handle = jQuery.event.dispatch

Sohil Sanghavi said...

Good One. Worked for me. Thanks