jquery validation not waiting for remote validation to return true, considers form valid
问题 $("#new_component_form").validate({ errorClass: 'input-error', rules : { "comp_data[account_name]" : { required: true, remote: { url: "/validate", data: { provider: 'twitter' } } } }, onsubmit: true, onfocusout: false, onkeyup: false, onclick: false }); $("#new_component_form").submit(function(){ console.log($(this).valid()); This outputs true, even if the value is invalid. I see the validation eventually fail and show the error message but the form is still submitted. 回答1: As of jQuery