polish Validation rules for Laravel 5.X Validator
Add the package to the require section of your composer.json and run composer update
"kduma/polish-validator": "^1.1"
Then add the Service Provider to the providers array in config/app.php
:
KDuma\Validator\PolishValidatorRulesServiceProvider::class,
You have 2 new Validator rules:
- pesel - Checks if number is valid PESEL number
- identity_card - Checks if number is polish identity document number
Use ready polish translations to paste in resources/lang/pl/validation.php
file:
"pesel" => 'Podany numer PESEL jest nieprawidłowy',
"identity_card" => 'Podany numer dowodu osobistego jest nieprawidłowy',
A special thanks to authors of phpedia.pl, an original pesel validator creators that this package is based on and Mariusz Tomaszewski (on algorytm.org) who wrote original identity card checker.
View this package on Packagist.org: kduma/polish-validator