Yii2: validation errors that are not attribute specific
问题 How do I handle generic validation errors in a Yii2 ActiveRecord model that do not relate to a specific attribute ? For example I need to completely prohibit saving a model when a related record/modal has been set to inactive. I can of course just pick a more or less random attribute and assign the error message to it, but what if the front end form doesn't have that attribute and therefore doesn't show the error? Or even worse, if a scenario later disables validation of that attribute (by