By default, the value of {0},{1}.. in
validator.format() get from
parameter that u pass in. Example you define a method name CheckABC:
$.validator.addMethod("CheckABC", function (value, element, para) {return false},jQuery.validator.format("Value: {0}"))
and using that method as:
$.validator.addClassRules({
ClassToCheck: {
CheckABC: "hahaha"
}
});
then, any input with class name = ClassToCheck, the error will show: Value hahaha.
Note: The para can be a array.
Another thing worth to note is, you also can pass a function instead of message like this:
$.validator.addMethod("CheckABC", function (value, element, para) {return false}, function(para, element){
var newPara = "New " + para; // manipulate your value
return Jquery.validator.format("Value: {0}", newPara);
})
and error message would be Value: new hahaha