I often use this jQuery validation plugin to validate forms and it works great. Really pleased with it, but when you press Submit on a form it automatically puts focus on the field that was invalid.
On my current project I have a form wich is really long, and when you press the submit button, your scroll jumps up to the field (probably because it gets focused), but when my form is this long i think it’s a bit annoying. Does anyone know how i can disable jQuery validate from putting focus on invalid input fields.
Best regards!
Use the
focusInvalidoption and set it tofalse:Working example here and Documentation here (options tab)