JQuery Validation Library (Document! X Sample)
jQuery.validator Namespace / options type / messages Option
In This Topic
    messages Option
    In This Topic
    Key/value pairs defining custom messages. Key is the name of an element, value the message to display for that element. Instead of a plain message another map with specific messages for each rule can be used. Overrides the title attribute of an element or the default message for the method (in that order). Each message can be a String or a Callback. The callback is called in the scope of the validator and with the rule's parameters as the first and the element as the second arugment, it must return a String to display as the message.
    var options; // Type:  jQuery.validator.options
    var instance; // Type:  jQuery.validator
    instance = $(".selector").validate(options);
    var value; // Type:  any
    // Get value
    value = instance.messages;
    // Set value
    instance.messages = value;
    var messages : any;
    Browser Compatibility
    See Also