jQuery validate only validates one field

Solution 1:

I just ran into this issue myself. Pulled my hair out for an hour, but here it is:

Throw the "name" attribute in there as well and that may do the trick.

Solution 2:

You have to enter the name attribute for every DOM element which you want to validate using the Jquery.validate() function .

Solution 3:

Without knowing what validation plugin you are using, it is difficult to nail down the problem. However, it seems as though jQuery isn't loop through each of the fields, but it stops when it reaches in an invalid field. Try using the jQuery $.each() method, and using some conditionals to make sure the validation process does not stop when the validator reaches an invalid field.

Hope that helps,
spryno724

Solution 4:

I think the alert is blocking the validation of both fields. After 1 alert the rest of the javascript stops. What happens if you use $('#questionForm').validate(); instead?