eee
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user