I’m trying to set some custom defaults for the jQuery validation plugin.
I’ve tried the following:
$.validate.settings.ignore = ":hidden";
and
$.validate.settings.errorPlacement = function (error, element) {
if (element.hasClass("removedTitle"))
error.insertAfter(element.next("img"));
else
error.insertAfter(element);
};
However, neither of these seem to make any difference. Is there a way to achieve this?
Try:
Further reading: http://docs.jquery.com/Plugins/Validation/Validator/setDefaults