Skip to content

Commit

Permalink
Merge pull request #8174 from kenjis/docs-validation-withRequest-not-…
Browse files Browse the repository at this point in the history
…recommended

docs: add notes to not recommened withRequest()
  • Loading branch information
kenjis authored Nov 9, 2023
2 parents c2f341a + 698dbf5 commit 6a56498
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions user_guide_src/source/libraries/validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,10 @@ For example, data returned by multi select dropdown:
withRequest()
=============

.. important:: This method exists only for backward compatibility. Do not use it
in new projects. Even if you are already using it, we recommend that you use
another, more appropriate method.

.. warning:: If you want to validate POST data only, don't use ``withRequest()``.
This method uses :ref:`$request->getVar() <incomingrequest-getting-data>`
which returns ``$_GET``, ``$_POST`` or ``$_COOKIE`` data in that order
Expand Down

0 comments on commit 6a56498

Please sign in to comment.