Skip to content

Commit 591a365

Browse files
committed
Merge branch '4.3' into 4.4
* 4.3: clarify constraints on non-submitted forms
2 parents b5010e7 + 27321db commit 591a365

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

form/without_class.rst

+7-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ But if the form is not mapped to an object and you instead want to retrieve a
7575
simple array of your submitted data, how can you add constraints to the data of
7676
your form?
7777

78-
The answer is to setup the constraints yourself, and attach them to the individual
78+
The answer is to set up the constraints yourself, and attach them to the individual
7979
fields. The overall approach is covered a bit more in :doc:`this validation article </validation/raw_values>`,
8080
but here's a short example::
8181

@@ -112,3 +112,9 @@ but here's a short example::
112112
If the form is not mapped to an object, every object in your array of
113113
submitted data is validated using the ``Symfony\Component\Validator\Constraints\Valid``
114114
constraint, unless you :doc:`disable validation </form/disabling_validation>`.
115+
116+
.. caution::
117+
118+
When a form is only partially submitted (for example, in an HTTP PATCH
119+
request), only the constraints from the submitted form fields will be
120+
evaluated.

0 commit comments

Comments
 (0)