Skip to content

Commit cc666fe

Browse files
wkaniaderrabus
andauthored
Update reference/constraints/Callback.rst
Co-authored-by: Alexander M. Turek <me@derrabus.de>
1 parent 754770e commit cc666fe

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

reference/constraints/Callback.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,9 +200,10 @@ You can then use the following configuration to invoke this validator:
200200
// src/Entity/Author.php
201201
namespace App\Entity;
202202
203+
use Acme\Validator;
203204
use Symfony\Component\Validator\Constraints as Assert;
204205
205-
#[Assert\Callback(["Acme\Validator", "validate"])]
206+
#[Assert\Callback([Validator::class, 'validate'])]
206207
class Author
207208
{
208209
}

0 commit comments

Comments
 (0)