diff --git a/src/App.php b/src/App.php index f81c352c..300f1b01 100755 --- a/src/App.php +++ b/src/App.php @@ -739,7 +739,7 @@ protected function validate(string $key, array $param, mixed $value): void } if (!$validator->isValid($value)) { - throw new Exception('Invalid ' . $key . ': ' . $validator->getDescription(), 400); + throw new Exception('Invalid `' . $key . '` param: ' . $validator->getDescription(), 400); } } diff --git a/tests/AppTest.php b/tests/AppTest.php index 5f08054a..d3952185 100755 --- a/tests/AppTest.php +++ b/tests/AppTest.php @@ -185,7 +185,7 @@ public function testCanExecuteRoute(): void $result = \ob_get_contents(); \ob_end_clean(); - $this->assertEquals('error: Invalid x: Value must be a valid string and no longer than 1 chars', $result); + $this->assertEquals('error: Invalid `x` param: Value must be a valid string and no longer than 1 chars', $result); // With Hooks