Hi,
I am not sure if this will help or not, but if I was looking to limit a field to a specific range of numbers, I would use a RegEx to achieve this, placing this in a custom script on the validation would mean that a user could not enter any value that does not pass the validation check.
The code I would use is
// I am not a regex expert and I am sure someone could simplify this down, but this is the basic of it
// ([0]{3}[1-9]) - makes sure 0000 is not allowed
// ([0][12][0-5][0-9]) - if it does start with a 0 then it can only be a 1 or a 2 after it, followed by 0-5 and then by 0-9
//([1][0-9][0-5][0-9]) - if it starts with a 1, then it can be followed by 0-9, then 0-5, then 0-9 again.
// ([2][0-3][0-5][0-9]) - if it starts with a 2, it can only be followed by a 0,1,2,3 and then 0-5 and 0-9
var myRegExp = new RegExp("([0]{3}[1-9])|([0][12][0-5][0-9])|([1][0-9][0-5][0-9])|([2][0-3][0-5][0-9])");
event.rc = myRegExp.test ( event.value);
I hope this helps
... View more