3 namespace Drupal\Core\TypedData\Validation;
5 use Symfony\Component\Validator\Validator\ContextualValidatorInterface as ContextualValidatorInterfaceBase;
8 * Extends the contextual validator validate method by a new parameter.
10 interface ContextualValidatorInterface extends ContextualValidatorInterfaceBase {
13 * Validates a value against a constraint or a list of constraints.
15 * If no constraint is passed, the constraint
16 * \Symfony\Component\Validator\Constraints\Valid is assumed.
19 * The value to validate
20 * @param \Symfony\Component\Validator\Constraint|\Symfony\Component\Validator\Constraint[] $constraints
21 * The constraint(s) to validate against.
22 * @param array|null $groups
23 * The validation groups to validate, defaults to "Default".
24 * @param bool $is_root_call
25 * (optional) Whether its the most upper call in the typed data tree.
27 * @see \Symfony\Component\Validator\Constraints\Valid
31 public function validate($value, $constraints = NULL, $groups = NULL, $is_root_call = TRUE);