Skip to content

Commit 64671f5

Browse files
committed
minor #7489 Reworded a note about custom constraints (javiereguiluz)
This PR was squashed before being merged into the 2.7 branch (closes #7489). Discussion ---------- Reworded a note about custom constraints This replaces #6610. Commits ------- a9d59fd Reworded a note about custom constraints
2 parents e9a4318 + a9d59fd commit 64671f5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

validation/custom_constraint.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ load this service from the container.
202202

203203
.. note::
204204

205-
In earlier versions of Symfony, the tag required an ``alias`` key (usually set
206-
to the class name). This is still allowed your constraint's ``validateBy()``
207-
method can return this alias (instead of a class name).
205+
In earlier versions of Symfony, the tag required an ``alias`` key (usually
206+
set to the class name). This ``alias`` is now optional, but if you define
207+
it, your constraint's ``validatedBy()`` method must return the same value.
208208

209209
Class Constraint Validator
210210
~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)