We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 23cc11c + 00c5173 commit 0b3104fCopy full SHA for 0b3104f
src/Request/FormRequest.php
@@ -102,6 +102,11 @@ public function setContainer(ContainerInterface $container): static
102
return $this;
103
}
104
105
+ public function rules(): array
106
+ {
107
+ return [];
108
+ }
109
+
110
/**
111
* Get the validator instance for the request.
112
*/
@@ -196,7 +201,7 @@ protected function getContextValidatorKey(string $key): string
196
201
197
202
protected function getRules(): array
198
203
{
199
- $rules = call_user_func_array([$this, 'rules'], []);
204
+ $rules = $this->rules();
200
205
$scene = $this->getScene();
206
if ($scene && isset($this->scenes[$scene]) && is_array($this->scenes[$scene])) {
207
return Arr::only($rules, $this->scenes[$scene]);
0 commit comments