Skip to content

Commit 670a1e1

Browse files
committed
docs: add missing validateData() to changelog
1 parent 8e98e4b commit 670a1e1

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

user_guide_src/source/changelogs/v4.2.0.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ Commands
118118
Others
119119
======
120120

121+
- Added ``$this->validateData()`` in Controller. See :ref:`controller-validatedata`.
121122
- Content Security Policy (CSP) enhancements
122123
- Added the configs ``$scriptNonceTag`` and ``$styleNonceTag`` in ``Config\ContentSecurityPolicy`` to customize the CSP placeholders (``{csp-script-nonce}`` and ``{csp-style-nonce}``)
123124
- Added the config ``$autoNonce`` in ``Config\ContentSecurityPolicy`` to disable the CSP placeholder replacement

user_guide_src/source/incoming/controllers.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,13 @@ the ``$rules`` array with the name of the group as defined in **app/Config/Valid
102102

103103
.. note:: Validation can also be handled automatically in the model, but sometimes it's easier to do it in the controller. Where is up to you.
104104

105+
.. _controller-validatedata:
106+
105107
$this->validateData()
106108
=====================
107109

110+
.. versionadded:: 4.2.0
111+
108112
Sometimes you may want to check the controller method parameters or other custom data.
109113
In that case, you can use the ``$this->validateData()`` method.
110114
The method accepts an array of data to validate in the first parameter:

0 commit comments

Comments
 (0)