Bug Tracker

Opened 14 years ago

Last modified 14 years ago

#2633 closed bug

JQuery Validator function bug — at Version 1

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.

Change History (2)

Changed 14 years ago by xfactor973

Attachment: example.html added

Quick example

comment:1 Changed 14 years ago by davidserduke

Component: coreplugin
Description: modified (diff)
Note: See TracTickets for help on using tickets.