Cover of the book Symfony 5: The Fast Track

Symfony 5: The Fast Track is the best book to learn modern Symfony development, from zero to production. +300 pages showcasing Symfony with Docker, APIs, queues & async tasks, Webpack, SPAs, etc.


You are browsing the documentation for Symfony 3.0 which is not maintained anymore.

Consider upgrading your projects to Symfony 5.2.

How to Disable the Validation of Submitted Data

3.0 version

How to Disable the Validation of Submitted Data

Sometimes it is useful to suppress the validation of a form altogether. For these cases you can set the validation_groups option to false:

use Symfony\Component\OptionsResolver\OptionsResolver;

public function configureOptions(OptionsResolver $resolver)
        'validation_groups' => false,

Note that when you do that, the form will still run basic integrity checks, for example whether an uploaded file was too large or whether non-existing fields were submitted. If you want to suppress validation, you can use the POST_SUBMIT event.

This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.