I am trying to validate a select box using a remote resource when the select box is changed but the remote resource is not getting triggered:
这是代码:
$("#register_student_2").validate({
submitHandler: function(form) {
$(form).ajaxSubmit({
rules: {
relationship: {
required: true,
remote: function() {
return {
type: "POST",
url: "includes/check-relationship.php",
}
}
},
},
beforeSubmit: function() {
//do something
},
clearForm: true,
success: function(data) {
},
});
}
});