public function ValidatorBuilder::setConstraintValidatorFactory in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/validator/ValidatorBuilder.php \Symfony\Component\Validator\ValidatorBuilder::setConstraintValidatorFactory()
Sets the constraint validator factory used by the validator.
Parameters
ConstraintValidatorFactoryInterface $validatorFactory The validator factory:
Return value
ValidatorBuilderInterface The builder object
Overrides ValidatorBuilderInterface::setConstraintValidatorFactory
File
- vendor/
symfony/ validator/ ValidatorBuilder.php, line 264
Class
- ValidatorBuilder
- The default implementation of {@link ValidatorBuilderInterface}.
Namespace
Symfony\Component\ValidatorCode
public function setConstraintValidatorFactory(ConstraintValidatorFactoryInterface $validatorFactory) {
if (null !== $this->propertyAccessor) {
throw new ValidatorException('You cannot set a validator factory after setting a custom property accessor. Remove the call to setPropertyAccessor() if you want to call setConstraintValidatorFactory().');
}
$this->validatorFactory = $validatorFactory;
return $this;
}