protected function validateBefore3($stage) { return $this->hasTable('roles') && $this->hasTable('role_categories'); }