I´m using jquery validate plugin to ensure at least one from a group of three checkboxes is checked and it´s woking fine. But I want validate these checkboxes only if the ra
You simply need to alter the logic of your custom method.
$.validator.addMethod('require-one', function(value) {
if ($('#resp01-sim').is(':checked')) {
return $('.require-one:checked').size() > 0;
} else {
return true;
}
}, 'Selecione pelo menos uma das opções.');