Year Only Validation Along with 'till' year set to 'Current' (text)

Year Only Validation Along with 'till' year set to 'Current' (text)

Okay, while the above solution works; I'm required to validate for 'tillYear' set to 'Current' as well. Here's how it's supposed to work: 




1. If the user clicks on 'Current/Pursuing' button, I want to set the value of 'Till' field to 'Current' as shown in above screen grab. 

2. If the user chooses to enter year, it must be: 

a- A 4-digit  year
b - Should lie between fromYear  - currentYear + 4years. 

I was able to achieve 2a and 2b with following rules; but the condition that the field should also accept 'Current' as input makes me go bongs! 

Perhaps I need to write a special validation rule that allows for word "current" along with 4-digit year that lies between the given range? 

"resumeDegreeFromYear[]": {
range: [currentYear - 60, currentYear],
minlength: 4,
maxlength: 4
},
"resumeDegreeTillYear[]": {
max: currentYear + 4,
minlength: 4,
maxlength: 4,
yearRange: true
}

co