1. Go to this page and download the library: Download kiczort/polish-validator library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kiczort / polish-validator example snippets
...
use Kiczort\PolishValidator\PeselValidator;
...
$validator = new PeselValidator();
if ($validator->isValid('123456789')) { // none strict mode
...
}
...
if ($validator->isValid('123456789', array('strict' => true))) { // with strict mode
...
}
...
...
use Kiczort\PolishValidator\NipValidator;
...
$validator = new NipValidator();
if ($validator->isValid('123456789')) {
...
}
...
...
use Kiczort\PolishValidator\RegonValidator;
...
$validator = new RegonValidator();
if ($validator->isValid('123456789')) {
...
}
...
...
use Kiczort\PolishValidator\PwzValidator;
...
$validator = new PwzValidator();
if ($validator->isValid('1234567')) {
...
}
...