PESEL validator for Symfony 4.x, 5.x and 6.x.
From the command line run
$ composer require pajerdesign/pesel-validator
Enable the bundle by adding new AJERdesign\PeselValidator\PeselValidator() to the bundles array of the return method in your project's config/bundles.php file:
<?php
return [
// ...
PAJERdesign\PeselValidator\PeselValidator::class => ['all' => true]
];
use PAJERdesign\PeselValidator\PeselValidator;
// ...
#[PeselValidator]
private ?string $pesel = null;
public function isSuperUser(): bool
{
return true;
}
use PAJERdesign\PeselValidator\PeselValidator;
// ...
/**
* @PeselValidator
*/
public $iban;