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
$("#myform").validate({ onfocusout: false, invalidHandler: function(form, validator) { var errors = validator.numberOfInvalids(); if (errors) { validator.errorList[0].element.focus(); } } });