Skip to content

Commit 8f799fe

Browse files
authored
Update custom_constraint.rst
Replace Annotation in custom constraint declaration by #[Attribute] which is more up to date
1 parent df78aae commit 8f799fe

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
@@ -267,9 +267,7 @@ email. First, create a constraint and override the ``getTargets()`` method::
267267

268268
use Symfony\Component\Validator\Constraint;
269269

270-
/**
271-
* @Annotation
272-
*/
270+
#[\Attribute]
273271
class ConfirmedPaymentReceipt extends Constraint
274272
{
275273
public string $userDoesNotMatchMessage = 'User\'s e-mail address does not match that of the receipt';

0 commit comments

Comments
 (0)