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 th
.focus()
on line 431.$('#frmTableDate').validationEngine({ focusFirstField: false });
in case we are using Validation Engine plugin to validate
Use the focusInvalid
option and set it to false
:
$("#abc").validate({
focusInvalid: false
});
Working example here and Documentation here (options tab)
$("#myform").validate({
onfocusout: false,
invalidHandler: function(form, validator) {
var errors = validator.numberOfInvalids();
if (errors) {
validator.errorList[0].element.focus();
}
}
});