public function validateModel($attribute, $params) { // check your import paths, if you get an error here // PHP error can't be catched as an exception if ($this->model) { Yii::import($this->model, true); } parent::validateModel($attribute, $params); }
public function validateModel($attribute, $params) { $actualModel = $this->model; if (!empty($this->model) && !empty($this->moduleName)) { $this->model = $this->moduleName . '.models.' . $this->model; } parent::validateModel($attribute, $params); $this->model = $actualModel; }