Please, I want to validate some field to ensure they are GREATER THAN A VALUE or LESSER THAN A VALUE. How can it be achieved
field/>10:Field must be greater than 10
field/<10:Field must be lesser than 10
You could write on Validation rules something like:
Then add a Javascript and write:
isGreaterthan10:Field must be greater than 10
Then add a Javascript and write:
jQuery.fn.form.settings.rules.isGreaterThan10 = function(value) {
if (value <= 10) {
return false; // you should return false so the error shows up
}
return true; // true will not show the error
}
This topic is locked and no more replies can be posted.
