I am trying to check the form field remotely. If the field receives focus while I am on the page, everything works fine. However, if the field never receives focus, the form requires me to double-click the Submit button to successfully submit.
I would like it to only confirm whether the field receives focus or somehow stops the form, requiring two clicks to be sent. Does anyone have any ideas?
$("#form1").validate({
rules: {
project: {
required: true,
remote: "check.php"
}
},
messages: {
project: {
required: "Required.",
remote: "Check Failed."
}
},
});
<input type="text" name="project" id="project" value="X"/>
source
share