« Back to Plugins/Validation/Validator

[edit]

showErrors( errors )

Show the specified messages.
Keys have to refer to the names of elements, values are displayed for those elements, using the configured error placement.


There is a repository of the error messages in many different languages. Browse it here
Arguments:
errorsObject<String, String>
One or more key/value pairs of input names and messages.


Examples:

Adds and shows error message programmatically.

var validator = $("#myform").validate();
validator.showErrors({"firstname": "I know that your firstname is Pete, Pete!"});

NameType