Skip to content

Commit ca3ef4b

Browse files
committed
Merge pull request #3313 from zczapran/2.2
[Book][Validation] validate method in Validator returns ConstraintViolationList not an array
2 parents 0bcc16b + 1b0e32b commit ca3ef4b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

book/validation.rst

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ Next, to actually validate an ``Author`` object, use the ``validate`` method
113113
on the ``validator`` service (class :class:`Symfony\\Component\\Validator\\Validator`).
114114
The job of the ``validator`` is easy: to read the constraints (i.e. rules)
115115
of a class and verify whether or not the data on the object satisfies those
116-
constraints. If validation fails, an array of errors is returned. Take this
117-
simple example from inside a controller::
116+
constraints. If validation fails, a non-empty list of errors
117+
(class :class:`Symfony\\Component\\Validator\\ConstraintViolationList`) is
118+
returned. Take this simple example from inside a controller:
118119

119120
// ...
120121
use Symfony\Component\HttpFoundation\Response;

0 commit comments

Comments
 (0)