Skip to content

Fixed invalid form validation reference #8956

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 2, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions form/disabling_validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,10 @@ these cases you can set the ``validation_groups`` option to ``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
:ref:`POST_SUBMIT event <form-dynamic-form-modification-suppressing-form-validation>`.
fields were submitted.

The submission of extra form fields can be controlled with the
`allow_extra_fields config option`_ and the maximum upload file size should be
handled via your PHP and web server configuration.

.. _`allow_extra_fields config option`: https://symfony.com/doc/current/reference/forms/types/form.html#allow-extra-fields
8 changes: 0 additions & 8 deletions form/dynamic_form_modification.rst
Original file line number Diff line number Diff line change
Expand Up @@ -702,11 +702,3 @@ field according to the current selection in the ``sport`` field:
The major benefit of submitting the whole form to just extract the updated
``position`` field is that no additional server-side code is needed; all the
code from above to generate the submitted form can be reused.

.. _form-dynamic-form-modification-suppressing-form-validation:

Suppressing Form Validation
---------------------------

To suppress form validation, set ``validation_groups`` to ``false`` or an empty
array.