MVC3 unobtrusive check does not work in IE

I have an MVC3 application, unobtrusive verification works fine in FireFox, but doesn't work in IE.

Any ideas why?

UPDATE

It seems that the unobtrusive jQuery validation library that ships with MVC3 is not fully compatible with the jQuery 1.7.1 used (which comes with the bootstrap template). Works in Firefox, does not work with IE 8 (the one I have).

I started updating jQuery to the version where it starts to work (not sure though if other things won't break!).

When I got to 1.8.1, it finally worked.

I kept upgrading jQuery when I got to 1.9.1 - the damn thing stopped working again :)

The latest version of jQuery, which worked for me with unobtrusive jQuery MVC3 validation, is 1.8.3.

It seems like this is also the latest version of jQuery that works with the unobtrusive MVC3 jQuery ajax library.

PS People using unobtrusive MVC3 or ajax validation don't use jQuery higher than v 1.8.3.

+8
asp.net-mvc-3 unobtrusive-validation
source share
3 answers

I have had similar problems recently, only with IE7 and IE8 (with MVC4).

To check again, I have the following versions installed:

jQuery: 1.8.3

JQuery validation: 1.9.0.1

Microsoft Unobruusive Validation: 2.0.30116.0 (last updated May 14, 2013)

I noticed that the transition to jQuery Validation v1.10 was that the problems started. During this post, jQuery Validation is v1.11.1 and does not work in IE7 / 8. It was also tested with both jQuery 1.8.3 and 1.9.1, and did not work with the latest version of jQuery validation.

Note. A particular problem for me was checking that there was a cheating and flag error for all inputs and flags, even if they were not “data needed”.

+7
source share

I had a very similar problem with what is being described. Using IE9 (Doc Mode: IE9 Standards), I got script errors where it worked in any other browser (and lower IE doc standards).

I solved the problem using jquery.validate.js (1.11.0)

With this, I could use jQuery-1.9.1.js and MVC3.0 jquery.validate.unobtrusive

+2
source share

At the time of writing ( September 2014 ), I tested the following combination and for me (with IE8 and surprised even with IE7 !) This works:

  • jQuery 1.11.1 (latest version 1.x)
  • jQuery.Validation 1.10.0
  • Microsoft.jQuery.Unobtrusive.Ajax 3.2.2 (latest available version)
  • Microsoft.jQuery.Unobtrusive.Validation 3.2.2 (latest available version)

Notice, with IE 11 (edge) sometimes I get (if I open the debugger with F12) the following error :

SCRIPT5007: Unable to get a call to the undefined property or null link File: jquery.validate.js, Row: 1234, Column: 5

But , if I close the debugger and use the form as a regular user , if it works fine .

Tested also with IE10 and IE9 (IE11 simulates them). No problems found yet .

If you cannot update (downgrade) nuget packages because you get a dependency error (jquery 1.4 or so), be sure to use the -IgnoreDependencies flag, for example:

Update-Package jQuery.Validation -Version 1.10.0 -IgnoreDependencies 

Enjoy (it’s good that IE8 support is not really like it, but if you are here it means that you are working with clients who cannot get rid of this crappy browser ...). Greetings;)

+2
source share

All Articles