File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 6
6
The :class: `Symfony\\ Component\\ Validator\\ Constraints\\ Cascade ` was
7
7
introduced in Symfony 5.2 and requires PHP 7.4.
8
8
9
- The Cascade constraint is used to validate a whole class. It allows to
10
- omit to add the :doc: `/reference/constraints/Valid ` constraint on each
11
- child object of your class you want to validate.
9
+ The Cascade constraint is used to validate a whole class, including all the
10
+ objects that might be stored in its properties. Thanks to this constraint,
11
+ you don't need to add the :doc: `/reference/constraints/Valid ` constraint on
12
+ every child object that you want to validate in your class.
12
13
13
14
========== ===================================================================
14
15
Applies to :ref: `class <validation-class-target >`
@@ -20,7 +21,7 @@ Basic Usage
20
21
21
22
In the following example, the
22
23
:class: `Symfony\\ Component\\ Validator\\ Constraints\\ Cascade ` constraint
23
- will tell the validator to validate all fields of the class, including
24
+ will tell the validator to validate all properties of the class, including
24
25
constraints that are set in the child classes ``BookMetadata `` and
25
26
``Author ``:
26
27
You can’t perform that action at this time.
0 commit comments