$this->validators[$name] = $this->container->get($name);
} else {
if (!class_exists($name)) {
- throw new ValidatorException(sprintf('Constraint validator "%s" does not exist or it is not enabled. Check the "validatedBy" method in your constraint class "%s".', $name, get_class($constraint)));
+ throw new ValidatorException(sprintf('Constraint validator "%s" does not exist or it is not enabled. Check the "validatedBy" method in your constraint class "%s".', $name, \get_class($constraint)));
}
$this->validators[$name] = new $name();