I want to have site wide default settings for all jQuery validation uses on my site, I want every form to use the below settings, but then on a per form basis change the rules and messages. Is this possible?
$('#myForm').validate({
errorClass: 'field-validation-error',
errorElement: 'span',
errorPlacement: function(error, element) {
element.next('span').remove();
error.insertAfter( element )
.removeClass('field-validation-error')
.addClass('ui-state-error');
},
success: function(label) {
label.remove();
}
});