I have 2 fields in my (simplified) form. And I use jQuery Validate plugin to validate both of them, but only one field is validated – see live example.
What can be wrong here? How to validate both fields?
(there is similar question, but there is no solution)
Validation is in fact being performed for both fields – you’re just not getting an error message. If you do an inspect element (using Chromium, or Firefox with Firebug), you’ll see the input tag will have a class
error.You’re missing the
<span></span>at the end of thedivsurrounding thelast_nameinput field. Add that empty span, and you’ll see the error message come up.