diff --git a/src/Symfony/Component/Validator/Constraints/CallbackValidator.php b/src/Symfony/Component/Validator/Constraints/CallbackValidator.php index 71bceb36b7ae..102838d80c5d 100644 --- a/src/Symfony/Component/Validator/Constraints/CallbackValidator.php +++ b/src/Symfony/Component/Validator/Constraints/CallbackValidator.php @@ -45,7 +45,7 @@ public function isValid($object, Constraint $constraint) $propertyPath = $context->getPropertyPath(); foreach ($methods as $method) { - if (is_array($method)) { + if (is_array($method) || $method instanceof \Closure) { if (!is_callable($method)) { throw new ConstraintDefinitionException(sprintf('"%s::%s" targeted by Callback constraint is not a valid callable', $method[0], $method[1])); }