This commit is contained in:
xl
2023-11-09 22:08:24 +08:00
parent 1112341e3f
commit 0db2958351
18 changed files with 121 additions and 297 deletions
+2 -3
View File
@@ -35,9 +35,8 @@ class ValidatorMiddleware implements MiddlewareInterface
*/
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
{
$validator = $this->validator->bindData($request);
if (!$validator->run()) {
return $this->response->html($validator->error(), 415);
if (!$this->validator->run($request)) {
return $this->response->html($this->validator->error(), 415);
} else {
return $handler->handle($request);
}