jQuery Validator: Validate Range
My form has two fields: fromYear and tillYear. Since both these fields are a part of a group of fields that repeat (or clone) I'm using following rule:
"fromYear[]": {
digits: true,
range: [1950, currentYear],
minlength: 4,
maxlength: 4
},
"tillYear[]": {
digits: true,
range: ["fromYear", "fromYear"+10] //How do I write it?
minlength: 4,
maxlength: 4
}
--
I wish to validate the tillYear range as : range: [fromYear, fromYear+10] and have no clue how to do it. Would really appreciate your help.