public function RecursiveValidator::validateProperty
public RecursiveValidator::validateProperty($object, $propertyName, $groups = NULL)
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
Overrides ValidatorInterface::validateProperty
File
- core/lib/Drupal/Core/TypedData/Validation/RecursiveValidator.php, line 97
Class
- RecursiveValidator
- Defines a recursive validator for Typed Data.
Namespace
Drupal\Core\TypedData\ValidationCode
public function validateProperty($object, $propertyName, $groups = NULL) { return $this->startContext($object) ->validateProperty($object, $propertyName, $groups) ->getViolations(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!TypedData!Validation!RecursiveValidator.php/function/RecursiveValidator::validateProperty/8.1.x