Set of messages (either strings or functions) which will be shown when given validation rule fails.
By setting already existing key the appropriate built-in message will be overridden.
Example
$("#myform").kendoValidator({
rules: {
custom: function(input) {
//...
}
},
messages: {
custom: "Please enter valid value for my custom rule",// defines message for the 'custom' validation rule
required: "My custom required message", // overrides the built-in message for required rule
email: function(input) { // overrides the built-in email rule message with a custom function which return the actual message
return getMessage(input);
}
}
});
Set of validation rules. Those rules will extend the built-in ones.
Example
$("#myform").kendoValidator({
rules: {
custom: function(input) {
return input.is("[name=firstname]") && input.val() === "Tom"; // Only Tom will be a valid value for FirstName input
}
}
});
Determines if validation will be triggered when element loses focus. Default value is true.