Skip to content

Commit 57a5853

Browse files
masilinawolfsarahmccarthy123
authored
Add example for controller argument validation (#5522)
* Add example for controller argument validation * Update Documentation/ExtensionArchitecture/Extbase/Reference/Validation/Index.rst Co-authored-by: Sarah McCarthy <sarahmccarthy123@yahoo.com> * Update Index.rst --------- Co-authored-by: Lina Wolf <48202465+linawolf@users.noreply.github.com> Co-authored-by: Sarah McCarthy <sarahmccarthy123@yahoo.com>
1 parent 5278041 commit 57a5853

File tree

1 file changed

+10
-0
lines changed
  • Documentation/ExtensionArchitecture/Extbase/Reference/Validation

1 file changed

+10
-0
lines changed

Documentation/ExtensionArchitecture/Extbase/Reference/Validation/Index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,16 @@ is applied with one argument.
103103
Validation of controller arguments
104104
===================================
105105

106+
You can also define controller argument validators:
107+
108+
**Example:**
109+
110+
.. code-block:: php
111+
:caption: Examples for controller argument validators
112+
113+
#[Validate(['validator' => 'EmailAddress', 'param' => 'email'])]
114+
public function submitAction(string $email): ResponseInterface
115+
106116
The following rules validate each controller argument:
107117

108118
* If the argument is a domain object, the annotations

0 commit comments

Comments
 (0)