jquery validation focus field on error
var validator = $("#test-form").validate({ /* settings */ });
$("#validate").click(function() {
if ($("#test-form").valid())
alert("Valid!");
else
validator.focusInvalid();
return false;
});