public ConstraintValidatorFactory::getInstance(Constraint $constraint)
Overrides ConstraintValidatorFactory::getInstance
File
- core/lib/Drupal/Core/Validation/ConstraintValidatorFactory.php, line 26
Class
- ConstraintValidatorFactory
- Defines a constraint validator factory that works with container injection.
Namespace
Drupal\Core\Validation
Code
public function getInstance(Constraint $constraint) { $class_name = $constraint->validatedBy(); if (!isset($this->validators[$class_name])) { $this->validators[$class_name] = $this->classResolver->getInstanceFromDefinition($class_name); } return $this->validators[$class_name]; }
Please login to continue.