I want the site email address to be located at the same domain as the website. If an email address with different domain is provided such value should not be saved into config.
I have taken care of this in UI but what about if some module sets this value(via custom form or programmatically) that I have no control over? How can I prevent it from making the change?
I asked on irc but it turned out the config has no constraint or validation mechanism other than the data type/format.
Am I missing something or there is really no way of "protecting" the config?
\Drupal\Core\Config\Config::save I see there is an event dispatched but it is only after the value has already been saved into storage.