For example, I have 3 forms on the same page with the same name. How can I validate all of these forms with a single validation method?
<form id="formID">
<input name="nick">
<input type="submit">
</form>
<form id="formID">
<input name="nick">
<input type="submit">
</form>
<form id="formID">
<input name="nick">
<input type="submit">
</form>
I want to confirm only the submitted form, not all at the same time.
$('#formID').validate({
})
My solution does not work. I also found that I could not add different identifiers, because these forms are in the PHP loop and must have the same identifier.
source
share