Skip to content

Commit 5b3e1e7

Browse files
author
Nilo Soares
committed
Update the content of the README file
1 parent 822be35 commit 5b3e1e7

File tree

1 file changed

+29
-1
lines changed

1 file changed

+29
-1
lines changed

README.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,30 @@
1-
# cpf-validator
1+
# CPF Symfony Validator
2+
23
A custom Symfony Validator that validates CPF.
4+
5+
## Requirements
6+
7+
- PHP >= 7.4
8+
9+
## Installation
10+
11+
composer require cancio-labs/cpf-symfony-validator
12+
13+
## How to use it
14+
15+
Add the CpfConstraint in your entity...
16+
17+
use CancioLabs\Validator\Cpf\CpfConstraint;
18+
19+
#[CpfConstraint]
20+
private ?Cpf $cpf = null;
21+
22+
or add it to a constraint list:
23+
24+
use CancioLabs\Validator\Cpf\CpfConstraint;
25+
26+
$formBuilder->add('cpf', TextType::class, [
27+
'constraints' => [
28+
new CpfConstraint(),
29+
],
30+
]);

0 commit comments

Comments
 (0)