You are here

public function ValidatorInterface::validateProperty in Zircon Profile 8

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

Validates a property of an object against the constraints specified for this property.

Parameters

object $object The object:

string $propertyName The name of the validated property:

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::validateProperty()
RecursiveValidator::validateProperty in vendor/symfony/validator/Validator/RecursiveValidator.php
Validates a property of an object against the constraints specified for this property.
RecursiveValidator::validateProperty in core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php
Validates a property of an object against the constraints specified for this property.

File

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

Class

ValidatorInterface
Validates PHP values against constraints.

Namespace

Symfony\Component\Validator\Validator

Code

public function validateProperty($object, $propertyName, $groups = null);