Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Symfony 3.2 Form field collection errors mapping #24268
I have implemented form field for collection with allow_delete = true, allow_add = true and by_reference = false options.
I added needed js code to delete elements and append forms for new objects of this collection from prototype.
This works as I expected, but when I submit a few subforms for this collection with indexes not in order (for example 0, 1, 3 instead of 0, 1, 2), then errors from subform with index 3 are assigned to index 2 (which not exists), but subforms are rendered with indexes 0, 1, 3 (same as before submit) after invalid form submit...
I'm sure that it worked correctly in Symfony (errors from subform with index 3 are assigned to subform with same index).