PHPackages                             kiczort/polish-validator - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Validation &amp; Sanitization](/categories/validation)
4. /
5. kiczort/polish-validator

ActiveLibrary[Validation &amp; Sanitization](/categories/validation)

kiczort/polish-validator
========================

Validators for Polish identification numbers: PESEL, NIP, REGON.

v1.2.0(3y ago)11122.8k—1%45MITPHPPHP &gt;=8.0

Since Jul 19Pushed 3y ago2 watchersCompare

[ Source](https://github.com/kiczort/polish-validator)[ Packagist](https://packagist.org/packages/kiczort/polish-validator)[ RSS](/packages/kiczort-polish-validator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (1)Versions (5)Used By (5)

PHP library with Polish validators
==================================

[](#php-library-with-polish-validators)

[![License](https://camo.githubusercontent.com/73c0971b14a5a2e9d69711ccc623971f2f465344271b35d2237ca18925d17a3e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b69637a6f72742f706f6c6973682d76616c696461746f722e737667)](https://packagist.org/packages/kiczort/polish-validator)[![Version](https://camo.githubusercontent.com/489ae57c68c2b811c78bf63ebe8391bfe5353ba6b4182e0e557f9d7b121497cd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b69637a6f72742f706f6c6973682d76616c696461746f722e737667)](https://packagist.org/packages/kiczort/polish-validator)[![Build status](https://github.com/kiczort/polish-validator/actions/workflows/test.yaml/badge.svg?event=push)](https://github.com/kiczort/polish-validator/actions/workflows/test.yaml?event=push)[![FOSSA Status](https://camo.githubusercontent.com/f2d609e2140f0c5ac29cea31fc99c7fc3c28329e3ad65e8ce54f98cb47e0dc52/68747470733a2f2f6170702e666f7373612e636f6d2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466b69637a6f7274253246706f6c6973682d76616c696461746f722e7376673f747970653d736869656c64)](https://app.fossa.com/projects/git%2Bgithub.com%2Fkiczort%2Fpolish-validator?ref=badge_shield)

This is PHP library with validators for Polish identification numbers like: PESEL, NIP, REGON.

Installation
============

[](#installation)

The recommended way to install this library is [Composer](http://getcomposer.org).

```
# Install Composer
curl -sS https://getcomposer.org/installer | php
```

Next, run the Composer command to install the latest stable version:

```
php composer.phar require kiczort/polish-validator
```

Documentation
=============

[](#documentation)

Example of use PeselValidator:
------------------------------

[](#example-of-use-peselvalidator)

There are PESEL numbers with errors in real word, so in case of this validator checksum checking is only for strict mode. In case of none strict mode it checks length, used chars and correctness of date of birth.

```
...
use Kiczort\PolishValidator\PeselValidator;
...
$validator = new PeselValidator();
if ($validator->isValid('123456789')) { // none strict mode
...
}
...
if ($validator->isValid('123456789', array('strict' => true))) { // with strict mode
...
}
...
```

Example of use NipValidator:
----------------------------

[](#example-of-use-nipvalidator)

```
...
use Kiczort\PolishValidator\NipValidator;
...
$validator = new NipValidator();
if ($validator->isValid('123456789')) {
...
}
...
```

Example of use RegonValidator:
------------------------------

[](#example-of-use-regonvalidator)

```
...
use Kiczort\PolishValidator\RegonValidator;
...
$validator = new RegonValidator();
if ($validator->isValid('123456789')) {
...
}
...
```

Example of use PwzValidator:
----------------------------

[](#example-of-use-pwzvalidator)

```
...
use Kiczort\PolishValidator\PwzValidator;
...
$validator = new PwzValidator();
if ($validator->isValid('1234567')) {
...
}
...
```

Bug tracking
============

[](#bug-tracking)

[GitHub issues](https://github.com/kiczort/polish-validator/issues). If you have found bug, please create an issue.

MIT License
===========

[](#mit-license)

License can be found [here](https://github.com/kiczort/polish-validator/blob/master/LICENSE).

[![FOSSA Status](https://camo.githubusercontent.com/6a8d003bac68fc6eb18effe7fef9a49be9f6bd01896e001966b18025172583ba/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466b69637a6f7274253246706f6c6973682d76616c696461746f722e7376673f747970653d6c61726765)](https://app.fossa.io/projects/git%2Bgithub.com%2Fkiczort%2Fpolish-validator?ref=badge_large)

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity40

Moderate usage in the ecosystem

Community20

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 94.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~795 days

Total

4

Last Release

1204d ago

PHP version history (2 changes)v1.0.0PHP &gt;=5.3.1

v1.2.0PHP &gt;=8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/a1c62763305e1ff66d4124b8af2eddc86b0d15381b5676a2b5e0914e8b5d721c?d=identicon)[kiczort](/maintainers/kiczort)

![](https://www.gravatar.com/avatar/5c396d89a61a7593f7e76e4082f4a25737da24c47e0dc1193d70a712f8306d16?d=identicon)[mleczakm](/maintainers/mleczakm)

---

Top Contributors

[![mleczakm](https://avatars.githubusercontent.com/u/3474636?v=4)](https://github.com/mleczakm "mleczakm (16 commits)")[![fossabot](https://avatars.githubusercontent.com/u/29791463?v=4)](https://github.com/fossabot "fossabot (1 commits)")

---

Tags

validatorregonnippeselpolish validatorpl validator

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kiczort-polish-validator/health.svg)

```
[![Health](https://phpackages.com/badges/kiczort-polish-validator/health.svg)](https://phpackages.com/packages/kiczort-polish-validator)
```

###  Alternatives

[kiczort/polish-validator-bundle

Symfony bundle with validators for Polish identification numbers: PESEL, NIP, REGON, PWZ.

1223.2k](/packages/kiczort-polish-validator-bundle)[respect/validation

The most awesome validation engine ever created for PHP

5.9k37.4M383](/packages/respect-validation)[seld/jsonlint

JSON Linter

1.3k217.8M205](/packages/seld-jsonlint)[composer/spdx-licenses

SPDX licenses list and validation library.

1.4k184.2M25](/packages/composer-spdx-licenses)[opis/json-schema

Json Schema Validator for PHP

64736.9M186](/packages/opis-json-schema)[laminas/laminas-validator

Validation classes for a wide range of domains, and the ability to chain validators to create complex validation criteria

15644.9M188](/packages/laminas-laminas-validator)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
