Skip to content

Commit 3eadd89

Browse files
committed
fixup! Use PHP attributes when creating custom validation constraints
1 parent 7212a90 commit 3eadd89

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

validation/custom_constraint.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,6 @@ Creating the Constraint Class
1414

1515
First you need to create a Constraint class and extend :class:`Symfony\\Component\\Validator\\Constraint`:
1616

17-
.. versionadded:: 5.2
18-
19-
The ability to use PHP attributes to configure constraint was introduced in
20-
Symfony 5.2. Prior to this, Doctrine Annotations were the only way to
21-
annotate constraints.
22-
2317
.. configuration-block::
2418

2519
.. code-block:: php-annotations
@@ -50,6 +44,12 @@ First you need to create a Constraint class and extend :class:`Symfony\\Componen
5044
public $message = 'The string "{{ string }}" contains an illegal character: it can only contain letters or numbers.';
5145
}
5246
47+
.. versionadded:: 5.2
48+
49+
The ability to use PHP attributes to configure constraint was introduced in
50+
Symfony 5.2. Prior to this, Doctrine Annotations were the only way to
51+
annotate constraints.
52+
5353
.. note::
5454

5555
The ``@Annotation`` annotation is necessary for this new constraint in

0 commit comments

Comments
 (0)