Assume I have a modal dialog where I allow the user to change values of an encapsulated configuration through different UI components and I want to save the effort to implement a validation per component or restrict the component models to allow invalid values to be chosen/entered and rather validate the state of all values when the dialog is requested to be closed.
Natuarally I'd refuse the dialog to be closed if at least one value is invalid, inform the user about the invalid state in a separate dialog or a similar UI window/component and continue to do so until the values are valid.
If the dialog or its UI components respectively write their values directly on the configuration instance - because I also want to save the effort to implement a discard function for configuration changes in the dialog - this seems to be a good deal - if only I was sure it doesn't violate any programming/usability standards.