I am trying to disable some requiredfield validators in an ASP.NET page. I have written following javascript function. I have four required field validators. The selector works fine but when it comes to disabling validation it fails. However if I change the for loop to for (var j = 0; j < validators.length-1; j++) the ValidatorEnable works for three i.e. I can disable them easily. Can anyone please let me know why I can't disable the last validator i.e. the fourth one.
function disableValidation() {
var validators = $("[id^=MainContent_MemberInitiateRolloverControl1_][id$=_vr]");
for (var j = 0; j < validators.length; j++) {
console.log(validators[j]);
ValidatorEnable(validators[j], false);
}