Skip to content

Commit 16050c8

Browse files
committed
Make it clear that configuring a constraint doesn't enforce anything
1 parent 9b1e5d6 commit 16050c8

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::
@@ -110,6 +110,11 @@ following:
110110
}
111111
}
112112
113+
Adding this configuration by itself does not yet guarantee that the value will
114+
not be blank; you can still set it to a blank value if you want.
115+
To actually guarantee that the value adheres to the constraint, the object must
116+
be passed to the Validator Service to be checked.
117+
113118
.. tip::
114119

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

0 commit comments

Comments
 (0)