Exact duplicate of How to select elements like question1, question2, question3,… in JQuery form validation plug-in?
<input type="text" name="question1" />
<input type="text" name="question2" />
<input type="text" name="question3" />
<input type="text" name="question4" />
$(document).ready(function() {
$("#item").validate({
rules: {
title: {
required: true,
minlength:40
},
???: {
required: true,
minlength:40
},
content: {
required: true,
minlength:100,
maxlength:2000
}
},
messages: {
}
});
});
$(":input[name^=question]") and `$(":input.question")` are used in Jquery general, not in Jquery form validation plug-in.