I'm adding JQuery validation rules dinamically with the function below:
function addRules(rulesObj) {
for (item in rulesObj) {
$('#' + item).rules('add', rulesObj[item]);
}
}
I'm using JQuery version 1.7.2 and JQuery validate 1.9 and it is not working in IE 7 and 8. Works fine in Chrome and FF. Am I missing anything?
The error: Object doesn't support this action.
The rule looks like this:
var ctrxRules = {
L4 : {
required : true
}
};
If the rule is empty it works.