Looking in ValidationSupport, there doesn't seem to be a way to remove a Control or a Validator after registering it with ValidationSupport.
Validator v = Validator.createEmptyValidator("control is required") validationSupport.registerValidator(control, v);
then It would be nice to be able to deregister using some of the following (whichever ones make sense): validationSupport.deregisterValidator(v) // deregister the validator or validationSupport.deregisterValidator(control) // deregister the control or validationSupport.deregisterValidator(control,v) // deregister the validator from control
I have a form that the validation rules for controls are set dynamically. For example doctor selection from drop down is mandatory unless "All Doctors" checkbox is selected. As a result I want to be able to deregister the validator for doctor dropdown when "All Doctors" is selected and register it again when the checkbox is deselected.