We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ea55e45 commit a928329Copy full SHA for a928329
EventListener/ExpressionLanguage.php
@@ -33,7 +33,7 @@ protected function registerFunctions()
33
34
$this->register('is_valid', fn ($object = 'null', $groups = 'null') => sprintf('0 === count($validator->validate(%s, null, %s))', $object, $groups), function (array $variables, $object = null, $groups = null) {
35
if (!$variables['validator'] instanceof ValidatorInterface) {
36
- throw new RuntimeException('"is_valid" cannot be used as the Validator component is not installed.');
+ throw new RuntimeException('"is_valid" cannot be used as the Validator component is not installed. Try running "composer require symfony/validator".');
37
}
38
39
$errors = $variables['validator']->validate($object, null, $groups);
0 commit comments