Bug Tracker

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#4745 closed bug (invalid)

[validate] validator breaks in IE8 with dropdowns

Reported by: BalusC Owned by:
Priority: major Milestone: 1.4
Component: plugin Version: 1.3.2
Keywords: validator IE8 dropdown Cc:
Blocked by: Blocking:

Description

Versions used: jquery.validator.js 1.5.2 (full, not min nor pack) jquery.js 1.3.2 IE 8.0.6001.18702

Code: see attachment.

Problem: jquery.validator.js breaks with following error: Line: 875 Char: 5 Error: Object required Code: 0

Attachments (1)

test.html (1.3 KB) - added by BalusC 10 years ago.
test file for jquery validator bug in IE8

Download all attachments as: .zip

Change History (7)

Changed 10 years ago by BalusC

Attachment: test.html added

test file for jquery validator bug in IE8

comment:1 Changed 10 years ago by BalusC

Excuse, the file is called jquery.validate.js, but that should have been obvious enough.

This problem doesn't occur in IE6 and IE7 by the way, as in any alternative browser I have here (FF, Opera, Safari, Chrome).

comment:2 Changed 10 years ago by BalusC

FYI: it works when I change the following part in line 875

$.browser.msie

by

$.browser.msie && $.browser.version < 8

If I recall correctly, some jQuery guy ever said that browser detection is a big no-no in jQuery. So I would rewrite the lines where browser detection is involved.

comment:3 Changed 10 years ago by hasantayyar

This because of "no value attribute".

Put "value" attribute to all "<option>".

comment:4 Changed 10 years ago by dmethvin

Resolution: invalid
Status: newclosed

comment:5 in reply to:  3 Changed 9 years ago by zlati.pehlivanov@…

Replying to hasantayyar:

This because of "no value attribute".

Put "value" attribute to all "<option>".

no it's not I'm getting an "Stop running this script" error in ie8 and 7 not always but 90% of the time. there is some serious bug here guys please fix it the form is 100% correct, i even remove the select and the remote and the additional validator rules, BUT no, it's givving me this error wich breaks all my logic and submit's the form normaly not by ajax

$(".initialRegister").validate({
		// TO DO implement recaptca validation and add to hidden field that is validated - the server will now not to check it again
		rules: {
			
			user_password: {
				required: true,
				minlength: 8
			},
			user_password2: {
				required: true,
				minlength: 8
				
			},
			user_email: {
				required: true,
				email: true
			},
			
			user_fname: {
				
				minlength: 2
			},
			user_lname: {
				
				minlength: 2
			},
			user_bname: {
				
				minlength: 2
			},
			user_pc: {
				postalcode: true
			}
			
			
			
		},
		messages:{
			
			user_email: {
				required: "Please enter your valid email",
				email: "Entred email is not valid."
			},
			
			user_fname: {
				
				minlength: "Your First name is too short"
			},
			user_lname: {
				
				minlength: "Your Last name is too short"
			},
			user_bname: {
				
				minlength: "Your business name is too short"
			},
			user_pc: {
				postalcode: "Contains unsupported characters"
			}
			
			
		},
		submitHandler: function(form){
			
		
			var ajaxoptions = { 

			    beforeSubmit:  showRequest,  // pre-submit callback
			    success:       showResponse,  // post-submit callback
				dataType: 'json'	
			};
			$(form).ajaxSubmit(ajaxoptions);
		},
		success:function(label) {
	
			
		},
		onsubmit: true,
		onfocusout:false,
		onkeyup:false,
		onclick:false,
		focusInvalid:false,
		
		errorClass: "invalid",
		errorElement: "em",
		errorPlacement: function(error, element){
	
			var label = $("label[for='" + element.attr('name') + "']");
			
			$(label).append(error);
		},
		debug: false
	});

comment:6 Changed 9 years ago by jitter

There is a reason why this ticket was closed as invalid.

The big red box on the "New Ticket" page rather clearly states:

For all other jQuery plugins:

This is NOT the correct form! Please use the Plugins site to report your bug to its author.

This tracker you submitted your bug on is for jQuery core bugs only. So bug reports for plugins should be filed on the plugin site or directly to the respective authors of those plugins. You can also try posting to the correct subforum in the jQuery Forum and maybe get support from other users of the plugin.

Note: See TracTickets for help on using tickets.