symfony/symfony — pull request #8421 by venu (2013-07-04 17:20:25+00:00)
Title: [Validator] fixed ConstraintViolation::$propertyPath incorrect when nested

| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #8351
| License | MIT

In nested constraints, the property path will be overwritten in the context (as there would be a recursive call to CollectionValidotor when nested). Reason is, in ConstraintValidatorFactory object is loaded from memory if exists and context is initialized with the new context. So, other constraints after the nested constraints PropertyPath would be wrong.

So I think better create a new object for CollectionValidator always.

see this https://gist.github.com/alexkappa/5851274
It shows [name][email] even though the email is not under the name node.
![image](https://f.cloud.github.com/assets/130384/750505/b18fe902-e4cd-11e2-8635-f3cdcb9cd16c.png)