PHPackages                             purpledot/validation-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. purpledot/validation-bundle

ActiveSymfony-bundle[Validation &amp; Sanitization](/categories/validation)

purpledot/validation-bundle
===========================

.

v2.0.1(3w ago)0133↓84.1%MITPHPPHP &gt;=8.0

Since Feb 1Pushed 3w ago1 watchersCompare

[ Source](https://github.com/PurpleDotRP/ValidationBundle)[ Packagist](https://packagist.org/packages/purpledot/validation-bundle)[ Docs](http://purpledot.pl)[ RSS](/packages/purpledot-validation-bundle/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (4)Dependencies (6)Versions (5)Used By (0)

Symfony Validation Bundle
=========================

[](#symfony-validation-bundle)

Additional validators set for Symfony.

Installation
------------

[](#installation)

From the command line run

```
$ composer require purpledot/validation-bundle

```

Validators
----------

[](#validators)

### PolishIdCardNumber

[](#polishidcardnumber)

Checks if the value is a valid Polish ID number.

Example usage

```
use PurpleDot\ValidationBundle\Validator\Constraints as PurpleDotAssert;

// ...

#[PurpleDotAssert\PolishIdCardNumber]
private ?string $idCardNUmber = null;
```

### PolishMobilePhone

[](#polishmobilephone)

Checks if the value is a valid Polish mobile phone number.

Example usage

```
use PurpleDot\ValidationBundle\Validator\Constraints as PurpleDotAssert;

// ...

#[PurpleDotAssert\PolishMobilePhone]
private ?string $phoneNumber;
```

### PolishTaxNumber

[](#polishtaxnumber)

Checks if the value is a valid Polish tax number (NIP).

ParameterTypeDefaultDescriptionrequirePrefixboolfalseEnable/disable tax number prefix requirementallowPrefixbooltrueEnable/Disable ability to provide a tax number prefixExample usage

```
use PurpleDot\ValidationBundle\Validator\Constraints as PurpleDotAssert;

// ...

#[PurpleDotAssert\PolishTaxNumber]
private ?string $taxNumber;

$this->taxNumber = 'PL7746249830' // valid
$this->taxNumber = '7746249830' // valid
```

Require tax number prefix

```
use PurpleDot\ValidationBundle\Validator\Constraints as PurpleDotAssert;

// ...

#[PurpleDotAssert\PolishTaxNumber(requirePrefix: true)]
private ?string $taxNumber;

$this->taxNumber = 'PL7746249830' // valid
$this->taxNumber = '7746249830' // invalid
```

Disallow tax number prefix

```
use PurpleDot\ValidationBundle\Validator\Constraints as PurpleDotAssert;

// ...

#[PurpleDotAssert\PolishTaxNumber(allowPrefix: false)]
private ?string $taxNumber;

$this->taxNumber = '7746249830' // valid
$this->taxNumber = 'PL7746249830' // invalid
```

### Pesel

[](#pesel)

Checks if the value is a valid PESEL number.

Example usage

```
use PurpleDot\ValidationBundle\Validator\Constraints as PurpleDotAssert;

// ...

#[PurpleDotAssert\Pesel]
private ?string $pesel = null;
```

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance95

Actively maintained with recent releases

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

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 ~179 days

Total

4

Last Release

24d ago

Major Versions

1.0.1 → v2.0.02026-07-24

PHP version history (2 changes)1.0.0PHP &gt;=7.4

v2.0.0PHP &gt;=8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/18317549?v=4)[PurpleDot](/maintainers/PurpleDot)[@purpledot](https://github.com/purpledot)

---

Tags

symfonyvalidatorvalidationnippeselID Cardmobile phonepolish id cardpolish tax numberpolish mobile phone

### Embed Badge

![Health badge](/badges/purpledot-validation-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/purpledot-validation-bundle/health.svg)](https://phpackages.com/packages/purpledot-validation-bundle)
```

###  Alternatives

[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k18.3M430](/packages/easycorp-easyadmin-bundle)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

12017.1k](/packages/rcsofttech-audit-trail-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.4M236](/packages/sulu-sulu)[shopware/storefront

Storefront for Shopware

674.7M285](/packages/shopware-storefront)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.8M672](/packages/shopware-core)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

516113.7k3](/packages/web-auth-webauthn-framework)

PHPackages © 2026

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