File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ First you need to create a Constraint class and extend :class:`Symfony\\Componen
38
38
39
39
use Symfony\Component\Validator\Constraint;
40
40
41
- #[\Attribute() ]
41
+ #[\Attribute]
42
42
class ContainsAlphanumeric extends Constraint
43
43
{
44
44
public $message = 'The string "{{ string }}" contains an illegal character: it can only contain letters or numbers.';
@@ -157,8 +157,8 @@ You can use custom validators like the ones provided by Symfony itself:
157
157
{
158
158
// ...
159
159
160
- #[Assert\NotBlank() ]
161
- #[AcmeAssert\ContainsAlphanumeric() ]
160
+ #[Assert\NotBlank]
161
+ #[AcmeAssert\ContainsAlphanumeric]
162
162
protected $name;
163
163
164
164
// ...
@@ -279,7 +279,7 @@ not to the property:
279
279
280
280
.. code-block :: php-attributes
281
281
282
- #[AcmeAssert\ProtocolClass() ]
282
+ #[AcmeAssert\ProtocolClass]
283
283
class AcmeEntity
284
284
{
285
285
// ...
You can’t perform that action at this time.
0 commit comments