interface ContextualValidatorInterface
Same name in other branches
- 8.9.x core/lib/Drupal/Core/TypedData/Validation/ContextualValidatorInterface.php \Drupal\Core\TypedData\Validation\ContextualValidatorInterface
- 10 core/lib/Drupal/Core/TypedData/Validation/ContextualValidatorInterface.php \Drupal\Core\TypedData\Validation\ContextualValidatorInterface
- 11.x core/lib/Drupal/Core/TypedData/Validation/ContextualValidatorInterface.php \Drupal\Core\TypedData\Validation\ContextualValidatorInterface
Extends the contextual validator validate method by a new parameter.
Hierarchy
- interface \Drupal\Core\TypedData\Validation\ContextualValidatorInterface extends \Symfony\Component\Validator\Validator\ContextualValidatorInterface
Expanded class hierarchy of ContextualValidatorInterface
All classes that implement ContextualValidatorInterface
File
-
core/
lib/ Drupal/ Core/ TypedData/ Validation/ ContextualValidatorInterface.php, line 10
Namespace
Drupal\Core\TypedData\ValidationView source
interface ContextualValidatorInterface extends ContextualValidatorInterfaceBase {
/**
* Validates a value against a constraint or a list of constraints.
*
* If no constraint is passed, the constraint
* \Symfony\Component\Validator\Constraints\Valid is assumed.
*
* @param mixed $value
* The value to validate
* @param \Symfony\Component\Validator\Constraint|\Symfony\Component\Validator\Constraint[] $constraints
* The constraint(s) to validate against.
* @param array|null $groups
* The validation groups to validate, defaults to "Default".
* @param bool $is_root_call
* (optional) Whether its the most upper call in the typed data tree.
*
* @see \Symfony\Component\Validator\Constraints\Valid
*
* @return $this
*/
public function validate($value, $constraints = NULL, $groups = NULL, $is_root_call = TRUE);
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
ContextualValidatorInterface::validate | public | function | Validates a value against a constraint or a list of constraints. | 1 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.