error not unsetting in validate plugin in dependent field
I've got a group of 3 radio buttons, 'foo[]'; if the user selects #foo0, then #fooDetail is not required, but if the user selects either #foo2 or #foo3, #fooDetail is required:
- var $req = "required";
- foo: $req,
- fooDetail: {
- required: function(element) {
- return $("#foo1").is(":checked")||$("#foo2").is(":checked");
- }
- },
The problem is, if someone selects #foo1 or #foo2, changing the selection to #foo0 doesn't unset the error message on #fooDetail. I've also tried
- return $("#foo0").not(":checked");
which fails similarly. How to fix?
Thanks,