Just a quick follow up - I've been running into this issue. I ended up duplicating the code for 'equalTo' as 'equalto' in the jquery.validate.min.js (latest from github master) file to get the client side validation for my forms to work properly. Not the ideal solution, but had to get something out the door.
Entry from my Rule file: {"name":"email","desc":"Email Address",
"rules": [
{"type":"required","failureMessage":"Email Address is required"},
{"type":"email","failureMessage":"Please enter a valid Email Address"}
]
},
{"name":"confirmemail","desc":"Confirm Email",
"rules": [
{"type":"required","failureMessage":"Confirmation Email Address is required"},
{"type":"equalTo",
"params" : [
{"name":"ComparePropertyName","value":"email"}
]
,"failureMessage":"Confirmation Email Address must match Email Address"
}
]
},
Generated Output:
fm['confirmemail'] = $(":input[name='confirmemail']",$form_formstep1);
if(fm['confirmemail'].length){
fm['confirmemail'].rules("add",{
required:true
,messages:{
required:"Confirmation Email Address is required"
}
});
}
fm['confirmemail'] = $(":input[name='confirmemail']",$form_formstep1);
if(fm['confirmemail'].length){
fm['confirmemail'].rules('add',{
"equalto":":input[name='email']","messages":{
"equalto":"Confirmation Email Address must match Email Address"
}
});
}
Removed the lcase from AbstractClientRuleScripter.cfc: if(fm['confirmemail'].length){
fm['confirmemail'].rules('add',{
"EqualTo":":input[name='email']","messages":{
"EqualTo":"Confirmation Email Address must match Email Address"
}
});
}
Final Entries in my jquery.validate.min.js (green original, yellow new)
equalTo: "Please enter the same value again.",
equalto: "Please enter the same value again.",
equalTo: function (a, b, d) {
d = c(d).unbind(".validate-equalTo").bind("blur.validate-equalTo", function () {
c(b).valid()
});
return a == d.val()
},
equalto: function (a, b, d) {
d = c(d).unbind(".validate-equalto").bind("blur.validate-equalto", function () {
c(b).valid()
});
return a == d.val()
}
Hope this helps someone else.
Chip.