Bug Tracker

Opened 12 years ago

Closed 12 years ago

#2633 closed bug (invalid)

JQuery Validator function bug

Reported by: xfactor973 Owned by:
Priority: major Milestone: 1.2.4
Component: plugin Version: 1.2.3
Keywords: Cc:
Blocked by: Blocking:

Description (last modified by davidserduke)

I created a function that is added to the validator. The function is:

		$.validator.addMethod("greaterThan",function(value,element,param){
			min = jQuery(param).val();
			max = value;
			confirm('min: ' + min);
			confirm('max: ' + max);
			confirm(min < max);
			return min < max;
		},"Please make sure the maximum price is greater than the minimum price");

The values are being pulled from a select list. When the min is equal to 99999 and the max is 125000 it returns true that the min is greater than the max. Any idea why this is happening? For all other values it works as expected.

Attachments (1)

example.html (4.0 KB) - added by xfactor973 12 years ago.
Quick example

Download all attachments as: .zip

Change History (3)

Changed 12 years ago by xfactor973

Attachment: example.html added

Quick example

comment:1 Changed 12 years ago by davidserduke

Component: coreplugin
Description: modified (diff)

comment:2 Changed 12 years ago by joern

Resolution: invalid
Status: newclosed

Can't reproduce that. Also, this isn't a problem with the validation plugin.

Note: See TracTickets for help on using tickets.