Defeating mysterious “This form should not contain extra fields” errors in Symfony Forms

I love the Symfony framework, but really hate the form component at times. Two years after the initial release of Symfony 2 and we’re still waiting on some decent form validation debugging.

But enough griping. If you’ve ever worked with form events, then undoubtedly you have run into the This form should not contain extra fields error. Basically what it means is that the request parameters don’t match up with the form against which you’re trying to validate.

“Yes, but.. but.. which parameters??” I hear you ask.  Try this:

 

Those “extra data” parameters.

 

Leave a Reply

Your email address will not be published. Required fields are marked *