function ValidValidator::validate
Overrides ConstraintValidatorInterface::validate
File
-
vendor/
symfony/ validator/ Constraints/ ValidValidator.php, line 23
Class
- ValidValidator
- @author Christian Flothmann <christian.flothmann@sensiolabs.de>
Namespace
Symfony\Component\Validator\ConstraintsCode
public function validate(mixed $value, Constraint $constraint) : void {
if (!$constraint instanceof Valid) {
throw new UnexpectedTypeException($constraint, Valid::class);
}
if (null === $value) {
return;
}
$this->context
->getValidator()
->inContext($this->context)
->validate($value, null, $this->context
->getGroup());
}