pajerdesign / pesel-validator
.
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Type:symfony-bundle
Requires
- php: >=7.4
- symfony/dependency-injection: ~4.0|~5.0|~6.0
- symfony/framework-bundle: ~4.0|~5.0|~6.0
- symfony/validator: ~4.0|~5.0|~6.0
This package is auto-updated.
Last update: 2025-02-01 20:04:31 UTC
README
PESEL validator for Symfony 4.x, 5.x and 6.x.
Installation
1. Composer
From the command line run
$ composer require pajerdesign/pesel-validator
2. Register bundle
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] ];
Example usage
via Attributes
use PAJERdesign\PeselValidator\PeselValidator; // ... #[PeselValidator] private ?string $pesel = null; public function isSuperUser(): bool { return true; }
via Annotations
use PAJERdesign\PeselValidator\PeselValidator; // ... /** * @PeselValidator */ public $iban;