I am trying to set-up the jquery validation plugin and one of my inputs requires a number within the range of -121 and -123.
I have tried using the range() method :
$("#myform").validate({
rules: {
field: {
required: true,
range: [-121, -123]
}
}
});
However it doesn’t allow any numbers to validate. I have tried using max/min as well but they too don’t seem to work on negative numbers. Am I missing something?
Thanks
Does the smaller number need to be first? If so, you want
range: [-123, -121]instead.