$.validator.setDefaults({ submitHandler: function(form) { form.submit(); } }); $().ready(function() { var validator = $("#fnewcity").bind("invalid-form.validate", function() { $("#summary").html("Your form contains errors, see details below."); }).validate({ debug: true, errorElement: "span", errorContainer: $("#warning, #summary"), errorClass: "Form_Error", errorPlacement: function(error, element) { // error.appendTo( element.parent("td").next("td") ); errTd = element.parent('td').parent('tr').next('tr').children('td'); errTd.empty(); error.appendTo( errTd ).removeClass().addClass("error"); }, success: function(label) { label.text("ok!").addClass("success"); }, rules: { city_name: { required: true, minLength: 3 }, city_country: { required: true, minlength: 3 } } }); });