Q:

jQuery validate defaults

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? 

A:

Try:
$.validator.setDefaults({ 
    ignore: ":hidden",
    errorPlacement: function (error, element) {
        if (element.hasClass("removedTitle"))
            error.insertAfter(element.next("img"));
        else
            error.insertAfter(element);
    }
});

Further reading: http://docs.jquery.com/Plugins/Validation/Validator/setDefaults

