-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Labels
Description
/**
* @return void
*/
public function afterValidate()
{
if (!Model::validateMultiple($this->owner->{$this->translationRelation})) {
$this->owner->addError($this->translationRelation);
foreach ($this->owner->{$this->translationRelation} as $model) {
/** @var ActiveRecord $model */
if ($model->hasErrors()){
$this->owner->addErrors($model->getErrors());
}
}
}
}
А то если валидация не проходит возвращается пустая ошибка от релейшена! а так будут ошибки модели возвращаться.
outOFFspace and lexxanderdream