Skip to content

Commit

Permalink
Fixes thanks to @xabbuh
Browse files Browse the repository at this point in the history
  • Loading branch information
weaverryan committed Sep 18, 2014
1 parent 62f8ffe commit baeae98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cookbook/validation/custom_constraint.rst
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ The validator class is also simple, and only has one required method ``validate(

Inside ``validate``, you don't need to return a value. Instead, you add violations
to the validator's ``context`` property and a value will be considered valid
if it causes no violations. The ``buildViolation`` takes the error message
as its argument and returns an instance of
:class:`Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilder`
if it causes no violations. The ``buildViolation`` method takes the error
message as its argument and returns an instance of
:class:`Symfony\\Component\\Validator\\Violation\\ConstraintViolationBuilderInterface`.
The ``addViolation`` method call finally adds the violation to the context.

.. versionadded:: 2.5
Expand Down

0 comments on commit baeae98

Please sign in to comment.