{"action":"opened","issue":{"url":"https://api.github.com/repos/creocoder/yii2-translateable/issues/5","labels_url":"https://api.github.com/repos/creocoder/yii2-translateable/issues/5/labels{/name}","comments_url":"https://api.github.com/repos/creocoder/yii2-translateable/issues/5/comments","events_url":"https://api.github.com/repos/creocoder/yii2-translateable/issues/5/events","html_url":"https://github.com/creocoder/yii2-translateable/issues/5","id":71871635,"number":5,"title":"afterValidate","user":{"login":"Skinka","id":7543469,"avatar_url":"https://avatars.githubusercontent.com/u/7543469?v=3","gravatar_id":"","url":"https://api.github.com/users/Skinka","html_url":"https://github.com/Skinka","followers_url":"https://api.github.com/users/Skinka/followers","following_url":"https://api.github.com/users/Skinka/following{/other_user}","gists_url":"https://api.github.com/users/Skinka/gists{/gist_id}","starred_url":"https://api.github.com/users/Skinka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Skinka/subscriptions","organizations_url":"https://api.github.com/users/Skinka/orgs","repos_url":"https://api.github.com/users/Skinka/repos","events_url":"https://api.github.com/users/Skinka/events{/privacy}","received_events_url":"https://api.github.com/users/Skinka/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-29T13:14:28Z","updated_at":"2015-04-29T13:14:28Z","closed_at":null,"body":"\r\n    /**\r\n     * @return void\r\n     */\r\n    public function afterValidate()\r\n    {\r\n        if (!Model::validateMultiple($this->owner->{$this->translationRelation})) {\r\n            $this->owner->addError($this->translationRelation);\r\n             foreach ($this->owner->{$this->translationRelation} as $model) {\r\n                /** @var ActiveRecord $model */\r\n                if ($model->hasErrors()){\r\n                    $this->owner->addErrors($model->getErrors());\r\n                }\r\n            }\r\n       }\r\n    }\r\n"}}