-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
Closed

Description
I am coding a project along the lines of the cookbook entry on embedded collections as stated on: http://symfony.com/doc/current/cookbook/form/form_collections.html.
I am considering the following use case:
- Starting out with entering a new entity task, tag is the embedded collection
- I click the Javascript 'add a tag'-link, which adds a bar 0 instance of the tag form
- I click the Javascript 'add a tag'-link, which adds a bar 1 instance of the tag form
- I click the Javascript 'add a tag'-link, which adds a bar 2 instance of the tag form
- I click the Javascript 'delete this tag'-link for tag(1), which leaves me with the instances 0 and 2
Now, if I would leave all these tags blank (with a notblank validation on the tag name attribute), the returned form would be expected to visualize the error statements on instances 0 and 2. However, it turns out that the feedback is only displayed for instance 0.
If I change the returned form with firebug and set the instances on the name input field of instance 2 to '1', the feedback is displayed on the correct instance. This behavior indicates a mismatch between the indexing of the embedded form instances and the validators.