Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ConstraintViolationInterface.php

function ConstraintViolationInterface::getPropertyPath

Returns the property path from the root element to the violation.

Return value

string The property path indicates how the validator reached the invalid value from the root element. If the root element is a <tt>Person</tt> instance with a property "address" that contains an <tt>Address</tt> instance with an invalid property "street", the generated property path is "address.street". Property access is denoted by dots, while array access is denoted by square brackets, for example "addresses[1].street".

1 method overrides ConstraintViolationInterface::getPropertyPath()
ConstraintViolation::getPropertyPath in vendor/symfony/validator/ConstraintViolation.php
Returns the property path from the root element to the violation.

File

vendor/symfony/validator/ConstraintViolationInterface.php, line 98

Class

ConstraintViolationInterface
A violation of a constraint that happened during validation.

Namespace

Symfony\Component\Validator

Code

public function getPropertyPath() : string;

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal