Do not validate removed entities. #708

merged 1 commit into from Jun 7, 2012


None yet
2 participants

Romain-Geissler commented Apr 24, 2012

When you edit a collection of entities, you can delete some of them only if they are valid. This an issue when you added a new entity by mistake and do not filled any value, but need now to delete it. With that PR, the deleted entities are no longer validated.

This patch is for 2.0 only and is very ugly as it wraps the whole FormInterface. This is due to Symfony 2.0 lacking this very crucial need to bypass validation of some part of the form. This feature were added to 2.1 through the option cascade_validation (it's sad such a useful and trivial feature becomes available only nowadays).


Romain-Geissler commented Jun 7, 2012

@rande Is there any chance that you merge this ugly PR one day ? If not, let me know, I'll close it.

I too don't like it, and Symfony 2.1 will bring a nicer solution, but for 2.0 it is still a remaining bug.

rande added a commit that referenced this pull request Jun 7, 2012

@rande rande merged commit 51423c1 into sonata-project:2.0 Jun 7, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment