Skip to content

Commit

Permalink
Fixed invalid form validation reference
Browse files Browse the repository at this point in the history
  • Loading branch information
HeahDude committed Jan 1, 2018
1 parent d117184 commit 2b904b7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
10 changes: 8 additions & 2 deletions form/disabling_validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,11 @@ 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.

Note that to disable the extra fields check, you can use the proper
`form type option`_.
One the other hand, the uploaded file limit should be handled via your php and
web server configuration.

.. _`form type option`: http://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.

0 comments on commit 2b904b7

Please sign in to comment.