ValidatorInterface getValidator()
Returns the validator.
Useful if you want to validate additional constraints:
public function validate($value, Constraint $constraint)
{
$validator = $this->context->getValidator();
$violations = $validator->validateValue($value, new Length(array('min' => 3)));
if (count($violations) > 0) {
// ...
}
}
Please login to continue.