[jQuery] [validate] invalidHandler is called before the errors are shown, maybe better vice versa?

[jQuery] [validate] invalidHandler is called before the errors are shown, maybe better vice versa?


Hi Jörn,
incredibly awesome plugin you've made, thanks a million! Started to
explore and using it, and stumbled onto situation.
In my invalidHandler, I'm trying to access the first input which is
marked as invalid (in order to ensure that it is visible - my form is
split on tabs, and I need to select a proper tab if the currently
selected one has no invalid fields). I'm doing this via $
('#myform :input.error:first') query, but there is a problem: in your
code, you mark fields as invalid AFTER the invalidHandler call (line
302):
if (!this.valid()) $(this.currentForm).triggerHandler("invalid-form",
[this]);
this.showErrors();
So, as a workaround at the moment I simply call showErrors(); in my
invalidHandler, but maybe - unless you have a special reason for this
- it's better to swap these lines in the jquery.validate.js? That's
actually my $0.02 suggestion.
cheers