Skip to content

Latest commit

 

History

History
40 lines (26 loc) · 2.02 KB

README.md

File metadata and controls

40 lines (26 loc) · 2.02 KB

L5-polish-validator-rules

Latest Stable Version Total Downloads Latest Unstable Version License SensioLabsInsight StyleCI

polish Validation rules for Laravel 5.X Validator

Setup

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,

Usage

You have 2 new Validator rules:

  • pesel - Checks if number is valid PESEL number
  • identity_card - Checks if number is polish identity document number

Translations

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',

Code Authors

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.

Packagist

View this package on Packagist.org: kduma/polish-validator