2017 © Pedro Peláez
 

library polish-validators

Polish Validators for Laravel

image

dartui/polish-validators

Polish Validators for Laravel

  • Friday, July 14, 2017
  • by Dartui
  • Repository
  • 1 Watchers
  • 0 Stars
  • 97 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 15 % Grown

The README.md

Laravel Polish Validators

Available rules

Name Description Example Field or Parameter
PESEL Universal Electronic System for Registration of the Population 73021604589 pesel
NIP VAT identification number (without leading PL) 123-123-12-12 nip
REGON Taxpayer Identification Number 158395862 regon
PWZ Doctors license number 6249056 pwz

Instalation

Require this package with composer:, (*1)

composer require dartui/polish-validators

After updating composer, add the ServiceProvider to the providers array in config/app.php, (*2)

Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider, (*3)

Dartui\PolishValidators\ServiceProvider::class

Now you need to add message to language files in resources/lang/XX/validation.php, (*4)

'valid' => 'The :attribute is not valid.',

Usage

By default validation type is chosen by field name. If you want you can force validation type by giving parameter after colon in rule., (*5)

$data = [
    'pesel'         => '01234567890',
    'some_field'    => '123123123',
    'another_field' => '12345678',
    'pwz'           => '1311111',
];

$validator = Validator::make( $data, [
    'pesel'         => 'valid',
    'some_field'    => 'valid:nip',
    'another_field' => 'valid:regon',
    'pwz'           => 'valid',
] );

$validator->valid();

The Versions

14/07 2017

dev-master

9999999-dev http://grabania.pl

Polish Validators for Laravel

  Sources   Download

MIT

The Requires

 

validator polish

13/07 2017

1.0.1

1.0.1.0 http://grabania.pl

Polish Validators for Laravel

  Sources   Download

MIT

The Requires

 

validator polish

13/07 2017

1.0.0

1.0.0.0 http://grabania.pl

Polish Validators for Laravel 5.4+

  Sources   Download

MIT

The Requires

 

validator polish