PHPackages                             rollerworks/pdb-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. rollerworks/pdb-validator

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

rollerworks/pdb-validator
=========================

PHP domain-parser Validators for the Symfony Validator component

v1.1.1(3w ago)02701MITPHPPHP ^8.2CI passing

Since Nov 3Pushed 3w ago1 watchersCompare

[ Source](https://github.com/rollerworks/PdbValidator)[ Packagist](https://packagist.org/packages/rollerworks/pdb-validator)[ RSS](/packages/rollerworks-pdb-validator/feed)WikiDiscussions main Synced today

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

Rollerworks PdbValidator
========================

[](#rollerworks-pdbvalidator)

This package provides public domain-suffix and top-level domain validators for the Symfony Validator component.

Allowing to validate the following (per constraint):

- If the domain-name is registrable (you cannot register name.github.io as this is a public-suffix managed by GitHub for example, and you cannot use custom TLDs;
- If the public-suffix of domain name is valid;

**Note:** These constraints are used by the [Rollerworks X509Validator](https://github.com/rollerworks/x509Validator)to ensure no invalid hostnames are used in the Certificate's subject.

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

[](#installation)

To install this package, add `rollerworks/pdb-validator` to your composer.json:

```
$ php composer.phar require rollerworks/pdb-validator
```

Now, [Composer](https://getcomposer.org/doc/00-intro.md) will automatically download all required files, and install them for you.

[Symfony Flex](https://symfony.com/doc/current/setup/flex.html) (with contrib) is assumed to enable the Bundle and add required configuration.

Otherwise enable the `Rollerworks\Component\PdbValidator\Bundle\RollerworksPdbValidatorBundle`and the `Rollerworks\Component\PdbSfBridge\Bundle\RollerworksPdbBundle`

**Note:** Don't forget to configure the `RollerworksPdbBundle`.

Requirements
------------

[](#requirements)

You need at least PHP 8.1, and configure the PdbManager as provided by [Rollerworks PdbSfBridge](https://github.com/rollerworks/PdbSfBridge).

Basic Usage
-----------

[](#basic-usage)

### Validators Set-up

[](#validators-set-up)

The Validators need to be registered with a ConstraintValidatorFactory, the bundle is already ready to use.

Both the `DomainNameRegistrableValidator` and `DomainNameSuffixValidator`require a `Rollerworks\Component\PdbSfBridge\PdpManager` instance is passed to their constructor.

### Constraints

[](#constraints)

- The `DomainNameRegistrable` constraint has one specific option `allowPrivate`which specifies if private-prefixes (like github.io) are allowed. Default is `false`.
- The `DomainNameSuffix` constraint has one specific option `requireICANN`which configures whether the effective TLD requires a matching rule in a Public Suffix List ICANN Section. Default is `true`.

    When set to `false` the suffix is still required to exist.

Versioning
----------

[](#versioning)

For transparency and insight into the release cycle, and for striving to maintain backward compatibility, this package is maintained under the Semantic Versioning guidelines as much as possible.

Releases will be numbered with the following format:

`..`

And constructed with the following guidelines:

- Breaking backward compatibility bumps the major (and resets the minor and patch)
- New additions without breaking backward compatibility bumps the minor (and resets the patch)
- Bug fixes and misc changes bumps the patch

For more information on SemVer, please visit .

License
-------

[](#license)

This library is released under the [MIT license](LICENSE).

Contributing
------------

[](#contributing)

This is an open source project. If you'd like to contribute, please read the [Contributing Guidelines](https://contributing.rollerscapes.net/). If you're submitting a pull request, please follow the guidelines in the [Submitting a Patch](https://contributing.rollerscapes.net/latest/patches.html) section.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance95

Actively maintained with recent releases

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~211 days

Total

5

Last Release

23d ago

PHP version history (2 changes)v1.0.0PHP ^8.1

v1.1.1PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![sstok](https://avatars.githubusercontent.com/u/904790?v=4)](https://github.com/sstok "sstok (22 commits)")

---

Tags

symfonyvalidatorpdbphp-domain-parser

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rollerworks-pdb-validator/health.svg)

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

###  Alternatives

[rollerworks/password-strength-validator

Password-strength validator for Symfony

1455.6M5](/packages/rollerworks-password-strength-validator)[barbieswimcrew/zip-code-validator

Constraint class for international zipcode validation

772.2M](/packages/barbieswimcrew-zip-code-validator)[sllh/iso-codes-validator

Symfony validator wrapper of ronanguilloux/isocodes

39298.7k2](/packages/sllh-iso-codes-validator)

PHPackages © 2026

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