Original report by Hadi Fakhreddin (Bitbucket: hadifa, GitHub: hadifa).
Hi team,
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.
该提问来源于开源项目:controlsfx/controlsfx