yiisoft/yii2 — pull request #4518 by thiagotalma (2014-07-29 23:55:43+00:00)
Title: Inform the class that generated the error

Thus better control the error display, for example, displaying elements on the page when a particular type of error.

I am suggesting a modification of minimal impact, which takes effect only when the Model is extended and the method is overridden to treat it.

However, I believe that this information can be useful and incorporated into the framework, changing the format of the array of errors, indicating which class generated particular error.