jQuery validation: .each with form
- by Kevin Brown
If I have a form of about 40 questions, how do I apply the same rules to questions 1-20, and 21-40?
For example:
$("#form_survey").validate({
rules: {
a_ +i: {max:12, maxlength:2},
},
messages: {
a_ +i:{
max: "That's too much!"
}
}
Where the "+i" is the ideal increment of +1...
Should be easy, I'm just stuck on syntax...