oi! another question. The form is at: http://fuzzysiberians.com/app4.cfm?a=1
I am using:
$('#sec_ssn3').rules("add", {
groups: {
ssn:"sec_ssn1 sec_ssn2 sec_ssn3"
},
required:true,
number: true,
messages: {
required: " <span style='color:red;'>Please enter co-applicant's social security number</span>"
}
});
If the co-applicant checkbox is checked, I ask for co-applicants social security number. The grouping somewhat works but how do i get rid of the repeat error messages? The last one doesn't even go away once a number is entered. The ssn for primary applicant works great. On the main validate() function, I added:
errorPlacement: function(error, element) {
if (element.attr("name") == "ssn1" || element.attr("name") == "ssn2" || element.attr("name") == "ssn3" )
error.insertAfter("#ssn3");
else if (element.attr("name") == "sec_ssn1" || element.attr("name") == "sec_ssn2" || element.attr("name") == "sec_ssn3" )
error.insertAfter("#sec_ssn3");
else
error.insertAfter(element);
}
some reason, it doesn't like that. hilfe? help? yardim?