jQuery validator annoyances

December 8, 2008

in jQuery

Null or Not an Object my ASS!

For all of you that use jQuery and use the Validator plugin, you may have been getting this error in Internet Explorer 6:

jQuery.Validator is null or not an object

This code will break any jQuery below your validation code, and will thoroughly piss you off.

The fix is simple: use the minified version (jquery.validate.min.js) javascript file, instead of the packed version (jquery.validate.pack.js).

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • StumbleUpon
  • Technorati
  • Twitter

Related posts:

  1. Simple Vertical Align Plugin for jQuery
  2. Google Chrome Frame Plugin for WordPress

{ 1 trackback }

jQuery Validator Plugin and IE8 | Anuj Gakhar's Blog
October 30, 2009 at 4:00 pm

{ 4 comments… read them below or add one }

Mark February 24, 2009 at 7:40 pm

This solution actually works. I’m having a different error but I suspect that its the jquery validator that is causing it.

Lesson learned. “Smallest is not the best option”

Reply

Ron Cansan May 24, 2009 at 10:30 pm

Just pack it using another tool
suggestion compressorrater thruhere net
packer 3.1 alpha

Reply

Grant June 19, 2009 at 2:52 pm

I actually had quite a few issues with this as well. The thing that worked for me was setting the charset of all of the jquery script files to charset=”ISO-8859-1″ and also using the validate.min.js . . . now it works like a charm in IE6 as well as in all others.

I did it as follows:
<script type="text/javascript" src="jquery.validate.min.js" charset="ISO-8859-1">

Hope this helps someone avoid all of the same headaches I had.

Reply

codeho January 5, 2010 at 10:07 pm

So i had the exact same problem in IE8 on windows 7,
but none of the above stated solutions fixed this.
what finally did fix it was that i had to change:
$(‘#myformId’).validate({
rules: {……….
to:
$(‘form’).validate({
rules: {………….
after that it worked fine in all browsers.
ch

Reply

Leave a Comment

Previous post:

Next post: