PHPackages                             kiczort/polish-validator-bundle - 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-bundle

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

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

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

v1.3.1(3y ago)1124.1k↑49.2%13[1 issues](https://github.com/kiczort/polish-validator-bundle/issues)MITPHPPHP &gt;=8.0CI failing

Since Jul 19Pushed 3y ago3 watchersCompare

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

READMEChangelog (8)Dependencies (9)Versions (9)Used By (0)

Symfony bundle with Polish validators
=====================================

[](#symfony-bundle-with-polish-validators)

[![License](https://camo.githubusercontent.com/39857c3f050ca1fec2b4be4935dfbf7a3b7ff23b8bb5afdc6aa9dad35a629702/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6b69637a6f72742f706f6c6973682d76616c696461746f722d62756e646c652e737667)](https://packagist.org/packages/kiczort/polish-validator-bundle)[![Version](https://camo.githubusercontent.com/7609fc6f63a68a330d87885fd5e216b9c58493b33d26023485b781a90ec6b463/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6b69637a6f72742f706f6c6973682d76616c696461746f722d62756e646c652e737667)](https://packagist.org/packages/kiczort/polish-validator-bundle)[![Build status](https://camo.githubusercontent.com/66f69e895815a905c4ba9e7eca497fe973d5e3826b0e2e8f5762fe38fc890cf9/68747470733a2f2f7472617669732d63692e6f72672f6b69637a6f72742f706f6c6973682d76616c696461746f722d62756e646c652e737667)](http://travis-ci.org/kiczort/polish-validator-bundle)[![Scrutinizer Quality Score](https://camo.githubusercontent.com/88ae6d726254c9e137acc5f3e52e6e7ee044e4e6ea34519f7296d9cbdb767501/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6b69637a6f72742f706f6c6973682d76616c696461746f722d62756e646c652e737667)](https://scrutinizer-ci.com/g/kiczort/polish-validator-bundle/)[![FOSSA Status](https://camo.githubusercontent.com/8d9f830cf628da9cfc32a160d8bb90dbd9c386280971554f9c47604f485f1c1f/68747470733a2f2f6170702e666f7373612e696f2f6170692f70726f6a656374732f6769742532426769746875622e636f6d2532466b69637a6f7274253246706f6c6973682d76616c696461746f722d62756e646c652e7376673f747970653d736869656c64)](https://app.fossa.io/projects/git%2Bgithub.com%2Fkiczort%2Fpolish-validator-bundle?ref=badge_shield)

This is Symfony bundle with validators for Polish identification numbers like: PESEL, NIP, REGON and PWZ.

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-bundle
```

Add bundle to AppKernel.php

```
    public function registerBundles()
        {
            $bundles = array(
                ...
                new Kiczort\PolishValidatorBundle\KiczortPolishValidatorBundle(),
                ...
            );

            return $bundles;
        }
```

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.

```
...
// src/AppBundle/Entity/Person.php
namespace AppBundle\Entity;

use Kiczort\PolishValidatorBundle\Validator\Constraints  as KiczortAssert;

class Person
{
    /**
     * @KiczortAssert\Pesel(
     *     message = "The '{{ value }}' is not a valid PESEL number.",
     *     strict = true
     * )
     */
     #[KiczortAssert\Pesel(message:  "The '{{ value }}' is not a valid PESEL number.", strict: true)]
     protected $pesel;
}
```

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

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

```
...
// src/AppBundle/Entity/Person.php
namespace AppBundle\Entity;

use Kiczort\PolishValidatorBundle\Validator\Constraints as KiczortAssert;

class Person
{
    /**
     * @KiczortAssert\Nip
     */
     #[KiczortAssert\Nip(message:  "This is not a valid NIP number.")]
     protected $nip;
}
```

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

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

```
...
// src/AppBundle/Entity/Company.php
namespace AppBundle\Entity;

use Kiczort\PolishValidatorBundle\Validator\Constraints as KiczortAssert;

class Company
{
    /**
     * @KiczortAssert\Regon
     */
     #[KiczortAssert\Regon(message:  "This is not a valid REGON number.")]
     protected $regon;
}
```

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

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

PWZ means "licence to practise a profession" (pl. "prawo wykonywania zawodu"), number given to doctors from NIL (polish Chamber of Physicians and Dentists). Validator accepts also empty strings and nulls so you have to add "Assert/NotBlank" myself.

```
...
// src/AppBundle/Entity/Company.php
namespace AppBundle\Entity;

use Kiczort\PolishValidatorBundle\Validator\Constraints  as KiczortAssert;

class Doctor
{
    /**
     * @KiczortAssert\Pwz
     */
     #[KiczortAssert\Pwz(message:  "This is not a valid PWZ number.")]
     protected $pwz;
}
```

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

[](#bug-tracking)

[GitHub issues](https://github.com/kiczort/polish-validator-bundle/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-bundle/blob/master/LICENSE).

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

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity73

Established project with proven stability

 Bus Factor1

Top contributor holds 61.4% 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 ~341 days

Recently: every ~524 days

Total

8

Last Release

1250d ago

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

v1.2.0PHP &gt;=5.6

v1.3.0PHP &gt;=8.0

### Community

Maintainers

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

---

Top Contributors

[![mleczakm](https://avatars.githubusercontent.com/u/3474636?v=4)](https://github.com/mleczakm "mleczakm (35 commits)")[![czerep1991](https://avatars.githubusercontent.com/u/12167916?v=4)](https://github.com/czerep1991 "czerep1991 (10 commits)")[![kiczort](https://avatars.githubusercontent.com/u/580696?v=4)](https://github.com/kiczort "kiczort (3 commits)")[![mikoweb](https://avatars.githubusercontent.com/u/4729995?v=4)](https://github.com/mikoweb "mikoweb (2 commits)")[![Eloar](https://avatars.githubusercontent.com/u/8638725?v=4)](https://github.com/Eloar "Eloar (2 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (2 commits)")[![piotrbrzezina](https://avatars.githubusercontent.com/u/6128834?v=4)](https://github.com/piotrbrzezina "piotrbrzezina (1 commits)")[![TomaszGasior](https://avatars.githubusercontent.com/u/1395027?v=4)](https://github.com/TomaszGasior "TomaszGasior (1 commits)")[![fossabot](https://avatars.githubusercontent.com/u/29791463?v=4)](https://github.com/fossabot "fossabot (1 commits)")

---

Tags

validatorSymfony Bundlesymfony-validatorregonnippeselpolish validatorpl validatorpwz

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M388](/packages/easycorp-easyadmin-bundle)

PHPackages © 2026

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