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
===========================

.

1.0.1(1y ago)0131↓79.4%MITPHPPHP &gt;=7.4

Since Feb 1Pushed 1y 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 today

READMEChangelog (2)Dependencies (3)Versions (3)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

26

—

LowBetter than 41% of packages

Maintenance43

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

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

Total

2

Last Release

455d ago

### 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.3k17.9M388](/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.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

515100.5k3](/packages/web-auth-webauthn-framework)[sulu/sulu

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

1.3k1.4M203](/packages/sulu-sulu)[web-auth/webauthn-symfony-bundle

FIDO2/Webauthn Security Bundle For Symfony

66529.9k11](/packages/web-auth-webauthn-symfony-bundle)[shopware/storefront

Storefront for Shopware

684.6M236](/packages/shopware-storefront)

PHPackages © 2026

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