/** * Preliminary check if model can be saved. * @param ActiveRecord $model * @return bool */ protected function beforeSave($model) { return $model->validate(); }