symfony/symfony — Issue #2729: Form error bubbles to the top with @Collection constraint and arrays
Author: arnaud-lb
Created: 2011-11-26 18:06:20+00:00
State: open

With the following code, errors related to Post->date['year'] are attached to the form instead of the 'year' element:

``` php
null);
}

$dateForm = $this->get('form.factory')
->createNamedBuilder('form', 'date')
->add('year', 'text');

$form = $this->get('form.factory')
->createBuilder('form', new Post)
->add($dateForm)
->getForm()
;
```

getErrorsAsString output:

```
ERROR: This value should not be blank
date:
year:
No errors
```

Expected output:

```
date:
ERROR: This value should not be blank
year:
```
or

```
date:
year:
ERROR: This value should not be blank
```