Skip to content

Commit 7feb782

Browse files
authored
Update RequestValidation.php
1 parent dd71343 commit 7feb782

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

src/RequestValidation.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,12 @@ public function __construct(array $rules)
4141
}
4242

4343
public function __invoke(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
44-
{
45-
$locale = $request
46-
->getAttribute('accept-language')
47-
;
48-
44+
{
4945
if ((bool) $this->rules) {
5046
/** @var RequestValidationRuleInterface $validator */
5147
foreach ($this->rules as $rule) {
5248
$this->validators = \array_merge($this->validators, $rule->rules());
53-
if ((bool)$messages = $rule->messages($locale)) {
49+
if ((bool)$messages = $rule->messages()) {
5450
$this->messages = \array_merge($this->messages, $messages);
5551
}
5652
}

0 commit comments

Comments
 (0)