bootstrap-validator
bootstrap-validator copied to clipboard
Validation of required radio button group with disabled buttons
Hi, I have a required radio button group of which I dynamically disable (and uncheck if applicable) certain buttons with jQuery. However when I trigger form validation without a radio selected and with disabled radio(s) present, the radio button group validates as correct instead of false. I can't use the trick with the readonly attribute and custom data-required validator since readonly doesn't work with radio buttons. Any tips on how I can achieve the desired behaviour?
Are you using the $().validator('update')
method after disabling or enabling a radio button?
I'm having the same issue
the radio btns work fine as long as I don't hit the submit btn and the form has errors. if the form has errors and the radio btn was not checked before the submit event, validation won't get trigger on the radio btns. any clue?
Same issue here. Dynamically disabling radio buttons in a group (and updating validator) will cause validation to no longer trigger on that group. Validation works fine on those radio buttons before dynamically updating the disabled attribute on any of them.