Skip to content

Commit a51af5d

Browse files
committed
Merge branch '5.2' into 5.x
* 5.2: Make it clear that configuring a constraint doesn't enforce anything
2 parents 15a5862 + 6aa6261 commit a51af5d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

validation.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ order to be valid. These rules are usually defined using PHP code or
4747
annotations but they can also be defined as ``.yaml`` or ``.xml`` files inside
4848
the ``config/validator/`` directory:
4949

50-
For example, to guarantee that the ``$name`` property is not empty, add the
50+
For example, to indicate that the ``$name`` property must not be empty, add the
5151
following:
5252

5353
.. configuration-block::
@@ -124,6 +124,11 @@ following:
124124
}
125125
}
126126
127+
Adding this configuration by itself does not yet guarantee that the value will
128+
not be blank; you can still set it to a blank value if you want.
129+
To actually guarantee that the value adheres to the constraint, the object must
130+
be passed to the validator service to be checked.
131+
127132
.. tip::
128133

129134
Symfony's validator uses PHP reflection, as well as *"getter"* methods, to

0 commit comments

Comments
 (0)