This commit is contained in:
xl
2023-11-09 20:45:51 +08:00
parent d6f6312af9
commit 1112341e3f
2 changed files with 2 additions and 3 deletions
+1 -1
View File
@@ -36,7 +36,7 @@ class ValidatorMiddleware implements MiddlewareInterface
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$validator = $this->validator->bindData($request);
if (!$validator->run($request)) {
if (!$validator->run()) {
return $this->response->html($validator->error(), 415);
} else {
return $handler->handle($request);