Hello,
So, I am using two custom methods, GreaterThan and LesserThan:
// custom code to for greater than
jQuery.validator.addMethod('greaterThan', function(value, element,
param) {
return ( value > jQuery(param).val() );
}, 'Must be greater than start' );
// custom code for lesser than
jQuery.validator.addMethod('lesserThan', function(value, element,
param) {
return ( value < jQuery(param).val() );
}, 'Must be less than end' );
Then, in the validation rules I have:
aupairLongStay: {required:true, greaterThan: "#aupairShortStay"},
aupairShortStay: {required:true, lesserThan: "#aupairLongStay"},
I'm trying to use them to test two select boxes against each other...
making sure one is less than the other but it doesn't work properly...
any ideas?