{"action":"created","issue":{"url":"https://api.github.com/repos/symfony/symfony/issues/17012","labels_url":"https://api.github.com/repos/symfony/symfony/issues/17012/labels{/name}","comments_url":"https://api.github.com/repos/symfony/symfony/issues/17012/comments","events_url":"https://api.github.com/repos/symfony/symfony/issues/17012/events","html_url":"https://github.com/symfony/symfony/issues/17012","id":122129811,"number":17012,"title":"[Form][Validator] Some errors are skipped","user":{"login":"enumag","id":539462,"avatar_url":"https://avatars.githubusercontent.com/u/539462?v=3","gravatar_id":"","url":"https://api.github.com/users/enumag","html_url":"https://github.com/enumag","followers_url":"https://api.github.com/users/enumag/followers","following_url":"https://api.github.com/users/enumag/following{/other_user}","gists_url":"https://api.github.com/users/enumag/gists{/gist_id}","starred_url":"https://api.github.com/users/enumag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/enumag/subscriptions","organizations_url":"https://api.github.com/users/enumag/orgs","repos_url":"https://api.github.com/users/enumag/repos","events_url":"https://api.github.com/users/enumag/events{/privacy}","received_events_url":"https://api.github.com/users/enumag/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-12-14T20:58:39Z","updated_at":"2015-12-15T10:48:07Z","closed_at":"2015-12-15T08:07:19Z","body":"After submitting an invalid form I noticed that I only got some of the errors instead of all of them. I only got the rest of the errors when I fixed the first batch.\r\n\r\nThe problem occurs when I try to validate a form using multiple validation groups. If the first validation group causes some errors, the other groups are skipped. After some digging I found [this line](https://github.com/symfony/symfony/blob/25b89d4af44fe6eea2102332abe9669ec10ada86/src/Symfony/Component/Validator/Validator/RecursiveContextualValidator.php#L836) which causes this unexpected behavior.\r\n\r\nI need to be able to show all the errors at once, not just some subset. But I do need more then one validation group for other reasons. Is there a way to fix this?"},"comment":{"url":"https://api.github.com/repos/symfony/symfony/issues/comments/164724252","html_url":"https://github.com/symfony/symfony/issues/17012#issuecomment-164724252","issue_url":"https://api.github.com/repos/symfony/symfony/issues/17012","id":164724252,"user":{"login":"ogizanagi","id":2211145,"avatar_url":"https://avatars.githubusercontent.com/u/2211145?v=3","gravatar_id":"","url":"https://api.github.com/users/ogizanagi","html_url":"https://github.com/ogizanagi","followers_url":"https://api.github.com/users/ogizanagi/followers","following_url":"https://api.github.com/users/ogizanagi/following{/other_user}","gists_url":"https://api.github.com/users/ogizanagi/gists{/gist_id}","starred_url":"https://api.github.com/users/ogizanagi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogizanagi/subscriptions","organizations_url":"https://api.github.com/users/ogizanagi/orgs","repos_url":"https://api.github.com/users/ogizanagi/repos","events_url":"https://api.github.com/users/ogizanagi/events{/privacy}","received_events_url":"https://api.github.com/users/ogizanagi/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T10:48:07Z","updated_at":"2015-12-15T10:48:07Z","body":"@enumag : If you really want to have a method deciding which group should be used for validation, I suggest you to create your own `ValidationGroupProviderInterface` & `getValidationGroups()` method, and implement it in each of your entities where it'll be needed.\r\nThen, simply update your pre-flush validation listener to use this method, and pass the returned groups to the `validate()` method."}}