PHPackages                             phenaproxima/domain-constraint - 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. phenaproxima/domain-constraint

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

phenaproxima/domain-constraint
==============================

A constraint for Symfony's Validator which tests if a value is a valid domain name.

1.0.1(10y ago)3202MITPHP

Since Mar 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/phenaproxima/DomainConstraint)[ Packagist](https://packagist.org/packages/phenaproxima/domain-constraint)[ RSS](/packages/phenaproxima-domain-constraint/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

DomainConstraint
================

[](#domainconstraint)

A constraint for Symfony's Validator component to test if a value is a valid domain name.

The value is tested against the rules at [http://en.wikipedia.org/wiki/Hostname#Restrictions\_on\_valid\_host\_names](http://en.wikipedia.org/wiki/Hostname#Restrictions_on_valid_host_names)

- At least two period-delimited segments
- Cannot start or end with a period
- Each segment must be between 1 and 63 characters
- The entire thing is no greater than 255 characters
- Valid characters are 'a' to 'z', 'A' to 'Z', '0' to '9', and hyphen (-)
- Labels cannot start or end with a hyphen
- The last segment must be a support top-level domains (and there are a LOT of strange ones)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

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

Total

2

Last Release

3850d ago

### Community

Maintainers

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

---

Top Contributors

[![colinodell](https://avatars.githubusercontent.com/u/202034?v=4)](https://github.com/colinodell "colinodell (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phenaproxima-domain-constraint/health.svg)

```
[![Health](https://phpackages.com/badges/phenaproxima-domain-constraint/health.svg)](https://phpackages.com/packages/phenaproxima-domain-constraint)
```

###  Alternatives

[sllh/iso-codes-validator

Symfony validator wrapper of ronanguilloux/isocodes

37299.8k2](/packages/sllh-iso-codes-validator)[digitalrevolution/symfony-validation-shorthand

Validation shorthand for symfony

12108.5k2](/packages/digitalrevolution-symfony-validation-shorthand)[digitalrevolution/symfony-request-validation

Automatic request validation for symfony

1296.0k](/packages/digitalrevolution-symfony-request-validation)

PHPackages © 2026

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