- PHP 8.0
- Symfony 5.4
{
"repositories": [
{
"type": "vcs",
"url": "https://github.com/irontec/data-validator-bundle"
}
]
}
{
"require": {
"irontec/data-validator": "dev-master"
}
}
composer install
Add the required validations to entity properties using attributes
use Irontec\DataValidator\Validators\Dni\Dni;
class Person {
#[Dni(['nullable' => true])]
private ?string $dni;
}