Skip to content

Commit c81d30a

Browse files
patrickbussmannjaviereguiluz
authored andcommitted
Added example for direct form submit with validation
See symfony/symfony#25331.
1 parent 20fff81 commit c81d30a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

form/direct_submit.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,3 +89,8 @@ method, pass the submitted data directly to
8989
"PATCH" method, the validation extension will only handle the submitted
9090
fields. If the underlying data needs to be validated, this should be done
9191
manually, i.e. using the validator.
92+
93+
When you need validation for some fields you can extend your data array with the required ones so that they will be validated.
94+
i.e.::
95+
96+
$form->submit(array_merge(['email' => null, 'username' => null], $request->request->all()), false);

0 commit comments

Comments
 (0)