In the code from this answer:
$.validator.addMethod('lessThanEqual', function(value, element, param) {
return this.optional(element) || parseInt(value) <= parseInt($(param).val());
}, "The value {0} must be less than {1}");
What is the meaning of {0}
and {1}
? What is the rule of thumb in Javascript to define those parameter replacements?
So based on the comments, I want to further ask in order to pass {0} and {1} here.
What is the syntax I have to use for validation function lessThanEqual.
thank you