jQuery validation: .each with form
Posted
by Kevin Brown
on Stack Overflow
See other posts from Stack Overflow
or by Kevin Brown
Published on 2010-03-16T02:16:17Z
Indexed on
2010/03/16
18:01 UTC
Read the original article
Hit count: 202
jQuery
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...
© Stack Overflow or respective owner