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.
1 parent 4d2d9ed commit fd5dbfbCopy full SHA for fd5dbfb
src/Request/FormRequest.php
@@ -104,6 +104,11 @@ public function setContainer(ContainerInterface $container): static
104
return $this;
105
}
106
107
+ public function rules(): array
108
+ {
109
+ return [];
110
+ }
111
+
112
/**
113
* Get the validator instance for the request.
114
*/
@@ -198,7 +203,7 @@ protected function getContextValidatorKey(string $key): string
198
203
199
204
protected function getRules(): array
200
205
{
201
- $rules = call_user_func_array([$this, 'rules'], []);
206
+ $rules = $this->rules();
202
207
$scene = $this->getScene();
208
if ($scene && isset($this->scenes[$scene]) && is_array($this->scenes[$scene])) {
209
return Arr::only($rules, $this->scenes[$scene]);
0 commit comments