string getPropertyPath(string $subPath = '')
Returns the property path to the value that the validator is currently validating.
For example, take the following object graph:
(Person)---($address: Address)---($street: string)
When the Person instance is passed to the validator, the property path is initially empty. When the $address property of that person is validated, the property path is "address". When the $street property of the related Address instance is validated, the property path is "address.street".
Properties of objects are prefixed with a dot in the property path. Indices of arrays or objects implementing the {@link \ArrayAccess} interface are enclosed in brackets. For example, if the property in the previous example is $addresses and contains an array of Address instance, the property path generated for the $street property of one of these addresses is for example "addresses[0].street".
Please login to continue.