Well, you can set focusInvalid: false and implement invalidHandler to focus the first field. That should do the trick.
Jörn On Tue, Sep 15, 2009 at 10:01 PM, Geoffrey <geoffreydhug...@gmail.com> wrote: > > And what if you enter an invalid character in an input at the bottom > of the field? For example entering a letter in the Conference Dinner > input of my sample form. > > A user is going to miss the error message at the top of the form along > with other input errors if there's an error in the last inputs of my > example form and is going to have submit multiple times before they > may even be aware of other errors. > > I'd expected jumping to the first invalid input to be standard > behaviour. My fault there I guess. > > > > > On Sep 15, 10:08 pm, Jörn Zaefferer <joern.zaeffe...@googlemail.com> > wrote: >> Whats wrong with keeping the focus on the active field, if its invalid? >> >> If you enter something into the, say, third field, hit enter to >> submit, then it turns out both that field and another before that are >> invalid, why move the focus to a different field? >> >> Jörn >> >> >> >> On Tue, Sep 8, 2009 at 4:47 AM, Geoffrey <geoffreydhug...@gmail.com> wrote: >> >> > I've been building up my validation using the jquery validation plugin >> > but I can't work out how to get a failed validation to default the >> > focus to the first invalid input rather than to the last selected >> > input. >> >> > If there is no input field selected, when I submit then a failed >> > validation will focus the cursor on the first field but if the cursor >> > was left in a field and submitted then the focus stays there (if it's >> > invalid) rather than jump to the first invalid input. From what I've >> > read and seen, this is the expected behaviour but not what I want. >> >> > Is there a way I can get the first invalid field and set the focus to >> > that? >> >> > A demo of what I have built up so far can be seen at >> >https://webdev2.otago.ac.nz/oihrn2009/ >> >> > All my jquery validation can be found in >> >https://webdev2.otago.ac.nz/oihrn2009/javascript/document.ready.all.js