File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
user_guide_src/source/libraries Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -309,8 +309,6 @@ To give a labeled error message you can set up as:
309
309
.. literalinclude :: validation/007.php
310
310
:lines: 2-
311
311
312
- .. _validation-withrequest :
313
-
314
312
.. note :: ``setRules()`` will overwrite any rules that were set previously. To add more than one
315
313
rule to an existing set of rules, use ``setRule() `` multiple times.
316
314
@@ -340,6 +338,8 @@ For example, data returned by multi select dropdown:
340
338
.. literalinclude :: validation/011.php
341
339
:lines: 2-
342
340
341
+ .. _validation-withrequest :
342
+
343
343
withRequest()
344
344
=============
345
345
Original file line number Diff line number Diff line change 4
4
$ request = \Config \Services::request ();
5
5
6
6
if ($ validation ->withRequest ($ request )->run ()) {
7
- // If you want to get the validated data.
7
+ // If you use the input data, you should get it from the getValidated() method.
8
+ // Otherwise you may create a vulnerability.
8
9
$ validData = $ validation ->getValidated ();
9
10
10
11
// ...
You can’t perform that action at this time.
0 commit comments