Skip to content

Commit 0b3104f

Browse files
committed
Merge branch 'master' into 3.1-merge
# Conflicts: # src/http-server/src/Response.php
2 parents 23cc11c + 00c5173 commit 0b3104f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Request/FormRequest.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ public function setContainer(ContainerInterface $container): static
102102
return $this;
103103
}
104104

105+
public function rules(): array
106+
{
107+
return [];
108+
}
109+
105110
/**
106111
* Get the validator instance for the request.
107112
*/
@@ -196,7 +201,7 @@ protected function getContextValidatorKey(string $key): string
196201
*/
197202
protected function getRules(): array
198203
{
199-
$rules = call_user_func_array([$this, 'rules'], []);
204+
$rules = $this->rules();
200205
$scene = $this->getScene();
201206
if ($scene && isset($this->scenes[$scene]) && is_array($this->scenes[$scene])) {
202207
return Arr::only($rules, $this->scenes[$scene]);

0 commit comments

Comments
 (0)