validate(); } /** * 初始化验证 * * @time 2019年11月27日 * @throws \Exception * @return mixed */ protected function validate() { try { $validate = new Validate(); if (!$validate->check(request()->param(), $this->rules())) { throw new FailedException($validate->getError()); } } catch (\Exception $e) { throw new ValidateFailedException($e->getMessage()); } return true; } }