Skip to content

Commit 620e6b4

Browse files
ffouilletxabbuh
authored andcommitted
Update custom_constraint.rst
Replace Annotation in custom constraint declaration by #[Attribute] which is more up to date
1 parent 14a9818 commit 620e6b4

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

validation/custom_constraint.rst

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,7 @@ email. First, create a constraint and override the ``getTargets()`` method::
214214

215215
use Symfony\Component\Validator\Constraint;
216216

217-
/**
218-
* @Annotation
219-
*/
217+
#[\Attribute]
220218
class ConfirmedPaymentReceipt extends Constraint
221219
{
222220
public string $userDoesNotMatchMessage = 'User\'s e-mail address does not match that of the receipt';

0 commit comments

Comments
 (0)