kf24 / nrpparser by orangepipl

Parser polskich NIP, REGON, PESEL
322
0
2
Package Data
Maintainer Username: orangepipl
Maintainer Contact: labapawel@gmail.com (Paweł Łaba)
Package Create Date: 2016-09-19
Package Last Update: 2016-09-22
Language: PHP
License: MIT
Last Refreshed: 2024-04-17 15:15:55
Package Statistics
Total Downloads: 322
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

NRPParser:

Parser dla laravela do numerów NIP, REGON PESEL

Instalacja:

do pliku composer.json w sekcji require-dev dodajemy

composer.json

    'kf24/nrpparser':'dev-master'

config/app.php

    'providers' => \[
            ..
            kf24\nrpparser\ProviderNRPParser::class,

/resources/lang/pl/validation.php

    'pesel'=> 'Numer pesel jest nieprawidłowy.'
    'nip'=> 'Numer nip jest nieprawidłowy.'
    'regon'=> 'Numer regon jest nieprawidłowy.'

Przykładowa walidacja

    \Validator::make(
                    [ // dane wejsciowe
                        'numer_nip'=>'xxxxxxxxxx',
                        'numer_regon'=>'xxxxxxxx',
                        'numer_pesel'=>'xxxxxxxxxxx'
                    ], 
                    [ // ustawienie walidatora
                        'numer_nip'=>'nip',
                        'numer_regon'=>'regon',
                        'numer_pesel'=>'pesel'
                    ]
              )