Skip to content

Commit 87e3a65

Browse files
authored
Update README.md to include attributes
1 parent 17fea10 commit 87e3a65

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,22 @@ class Company
4040
}
4141
```
4242

43+
or by using attributes:
44+
45+
```php
46+
<?php
47+
48+
namespace App\Entity;
49+
50+
use Kreyu\Bundle\NipValidatorBundle\Validator\Constraints as Assert;
51+
52+
class Company
53+
{
54+
#[Assert\Nip]
55+
private $nip;
56+
}
57+
```
58+
4359
or by using YAML:
4460

4561
```yaml

0 commit comments

Comments
 (0)