[Validate] After submission, new errors seem to ignore the errorPlacement() method
This is the errorPlacement method in my code:
- errorPlacement: function(error, element) {
- if(element.attr('name') == 'groups[buyer][email]' && error.html().indexOf('<a') > 0)
- {
- console.log('placeing');
- error.appendTo($('#email_inuse_error'));
- return;
- }
- error.remove();
- },
Which makes is so that my email field is the only field that shows inline error messages, and only shows the one message which includes a link.
However, after the email field blur()'s and the message showing a link appears, the validation plugin will start validating on keypresses (which is OK) and placing all of the subsequent messages into the #email_inuse_error div, when they should have just been removed by the conditional in errorPlacement().
What am I missing?