Problem is, if I have a setting with a default value and it is not in the list of BLANK_ATTRS, it never gets invalidated. IIUC default value is only taken into account if value is nil. It does not make much sense to me, what exactly I am missing?
This PR: https://github.com/theforeman/foreman/pull/7934 makes sure that all settings that are of the setting_type array or string they must not be blank, unless they are a part of the BLANK_ATTRS array.
This is my understanding, let me know if I missed anything.
First validation states “only boolean or BLANK_ATTR can have nil default”, second “Validate array values not to be blank unless it’s a BLANK_ATTR”.
It is that way for a long time, I think it could be because there is not really clear and good API to add to BLANK_ATTRS.
If we change this, we should go over all the string settings over all the plugin (or make it backward compatible with warning) and make sure they are supposed to be filled up or not.
IMHO it’s not worth the effort, I’d rather make more clear setting API first.