Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion validation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ order to be valid. These rules are usually defined using PHP code or
annotations but they can also be defined as ``.yaml`` or ``.xml`` files inside
the ``config/validator/`` directory:

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

.. configuration-block::
Expand Down Expand Up @@ -110,6 +110,11 @@ following:
}
}

Adding this configuration by itself does not yet guarantee that the value will
not be blank; you can still set it to a blank value if you want.
To actually guarantee that the value adheres to the constraint, the object must
be passed to the Validator Service to be checked.

.. tip::

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