Skip to content

Commit 2ebdb50

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: Added example for direct form submit with validation
2 parents 2dfbadb + 7836f5a commit 2ebdb50

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

form/direct_submit.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ control over when exactly your form is submitted and what data is passed to it::
5151
.. caution::
5252

5353
When the second parameter ``$clearMissing`` is ``false``, like with the
54-
"PATCH" method, the validation extension will only handle the submitted
55-
fields. If the underlying data needs to be validated, this should be done
56-
manually, i.e. using the validator.
54+
"PATCH" method, the validation will only apply to the submitted fields. If
55+
you need to validate all the underlying data, add the required fields
56+
manually so that they are validated::
57+
58+
// 'email' and 'username' are added manually to force their validation
59+
$form->submit(array_merge(['email' => null, 'username' => null], $request->request->all()), false);

0 commit comments

Comments
 (0)