This commit is contained in:
xl
2023-11-09 20:45:16 +08:00
parent c3753bbd28
commit d6f6312af9
3 changed files with 12 additions and 7 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ class ValidatorMiddleware implements MiddlewareInterface
{
$validator = $this->validator->bindData($request);
if (!$validator->run($request)) {
return $this->response->html('400 Bad Request', 400);
return $this->response->html($validator->error(), 415);
} else {
return $handler->handle($request);
}