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)0109↓62.5%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 1mo ago

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

27

—

LowBetter than 49% of packages

Maintenance46

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

409d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7cc5da5a9bfb58001649f9ee8f421dfaa22a7dd3a57cdf52475ad596f0101cc7?d=identicon)[PurpleDot](/maintainers/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

[barbieswimcrew/zip-code-validator

Constraint class for international zipcode validation

772.3M](/packages/barbieswimcrew-zip-code-validator)[kiczort/polish-validator-bundle

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

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

Jquery form validation bundle for symfony 2

2773.9k1](/packages/boekkooi-jquery-validation-bundle)[kiczort/polish-validator

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

11122.8k5](/packages/kiczort-polish-validator)[j-ben87/parsley-bundle

Convert Symfony constraints into data-attributes for client-side validation with Parsley.

1432.7k](/packages/j-ben87-parsley-bundle)

PHPackages © 2026

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