yiisoft/yii2 — pull request #561 by resurtm (2013-06-20 14:24:19+00:00)
Title: Empty error message in Model::addError().

This can be useful to make [this sample code](https://gist.github.com/resurtm/5815403) even better. If you look at the `Product::afterValidate()` method you can see `$this->addError('orders', 'Orders are invalid!');`. With patch provided in this PR it can be rewritten as `$this->addError('orders');`, which looks much better as we don't need message error for the `orders` relation.

I and @creocoder thought about introduction of returning boolean value in the `Model::afterValidate()` method but it seems worse for us.