jQuery: The Write Less, Do More JavaScript Library

Plugins/Validation/Validator/showErrors

From jQuery JavaScript Library

Jump to: navigation, search

« Back to Plugins/Validation/Validator

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.
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