$.validator.addMethod( "lessThan", function( value, element, param ) {
var target = $( param );
if ( this.settings.onfocusout && target.not( ".validate-lessThan-blur" ).length ) {
target.addClass( "validate-lessThan-blur" ).on( "blur.validate-lessThan", function() {
$( element ).valid();
} );
}
return value < target.val();
}, "Please enter a lesser value." );
|