Skip to content

Commit

Permalink
Update README.md to include attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kreyu authored Mar 23, 2023
1 parent 17fea10 commit 87e3a65
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@ class Company
}
```

or by using attributes:

```php
<?php

namespace App\Entity;

use Kreyu\Bundle\NipValidatorBundle\Validator\Constraints as Assert;

class Company
{
#[Assert\Nip]
private $nip;
}
```

or by using YAML:

```yaml
Expand Down

0 comments on commit 87e3a65

Please sign in to comment.