interface ContextualValidatorInterface in Zircon Profile 8.0
Same name in this branch
- 8.0 vendor/symfony/validator/Validator/ContextualValidatorInterface.php \Symfony\Component\Validator\Validator\ContextualValidatorInterface
- 8.0 core/lib/Drupal/Core/TypedData/Validation/ContextualValidatorInterface.php \Drupal\Core\TypedData\Validation\ContextualValidatorInterface
Same name and namespace in other branches
- 8 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 \Symfony\Component\Validator\Validator\ContextualValidatorInterface
- interface \Drupal\Core\TypedData\Validation\ContextualValidatorInterface
Expanded class hierarchy of ContextualValidatorInterface
All classes that implement ContextualValidatorInterface
File
- core/
lib/ Drupal/ Core/ TypedData/ Validation/ ContextualValidatorInterface.php, line 15 - Contains \Drupal\Core\TypedData\Validation\ContextualValidatorInterface.
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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ContextualValidatorInterface:: |
public | function | Appends the given path to the property path of the context. | 2 |
ContextualValidatorInterface:: |
public | function | Returns the violations that have been generated so far in the context of the validator. | 2 |
ContextualValidatorInterface:: |
public | function |
Validates a value against a constraint or a list of constraints. Overrides ContextualValidatorInterface:: |
|
ContextualValidatorInterface:: |
public | function | Validates a property of an object against the constraints specified for this property. | 2 |
ContextualValidatorInterface:: |
public | function | Validates a value against the constraints specified for an object's property. | 2 |