Skip to content

Commit 6aa6261

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: Make it clear that configuring a constraint doesn't enforce anything
2 parents 40d3dc5 + 26b82af commit 6aa6261

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)