diff --git a/src/Request/FormRequest.php b/src/Request/FormRequest.php index f5e6aa6..2db23a4 100755 --- a/src/Request/FormRequest.php +++ b/src/Request/FormRequest.php @@ -102,6 +102,11 @@ public function setContainer(ContainerInterface $container): static return $this; } + public function rules(): array + { + return []; + } + /** * Get the validator instance for the request. */ @@ -196,7 +201,7 @@ protected function getContextValidatorKey(string $key): string */ protected function getRules(): array { - $rules = call_user_func_array([$this, 'rules'], []); + $rules = $this->rules(); $scene = $this->getScene(); if ($scene && isset($this->scenes[$scene]) && is_array($this->scenes[$scene])) { return Arr::only($rules, $this->scenes[$scene]);