You are here

public function ValidatorInterface::validatePropertyValue in Zircon Profile 8

Same name in this branch
  1. 8 vendor/symfony/validator/ValidatorInterface.php \Symfony\Component\Validator\ValidatorInterface::validatePropertyValue()
  2. 8 vendor/symfony/validator/Validator/ValidatorInterface.php \Symfony\Component\Validator\Validator\ValidatorInterface::validatePropertyValue()
Same name and namespace in other branches
  1. 8.0 vendor/symfony/validator/Validator/ValidatorInterface.php \Symfony\Component\Validator\Validator\ValidatorInterface::validatePropertyValue()

Validates a value against the constraints specified for an object's property.

Parameters

object|string $objectOrClass The object or its class name:

string $propertyName The name of the property:

mixed $value The value to validate against the: property's constraints

array|null $groups The validation groups to validate. If: none is given, "Default" is assumed

Return value

ConstraintViolationListInterface A list of constraint violations. If the list is empty, validation succeeded

2 methods override ValidatorInterface::validatePropertyValue()
RecursiveValidator::validatePropertyValue in vendor/symfony/validator/Validator/RecursiveValidator.php
Validates a value against the constraints specified for an object's property.
RecursiveValidator::validatePropertyValue in core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php
Validates a value against the constraints specified for an object's property.

File

vendor/symfony/validator/Validator/ValidatorInterface.php, line 77

Class

ValidatorInterface
Validates PHP values against constraints.

Namespace

Symfony\Component\Validator\Validator

Code

public function validatePropertyValue($objectOrClass, $propertyName, $value, $groups = null);