Download the PHP package rollerworks/pdb-validator without Composer
On this page you can find all versions of the php package rollerworks/pdb-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rollerworks/pdb-validator
More information about rollerworks/pdb-validator
Files in rollerworks/pdb-validator
Package pdb-validator
Short Description PHP domain-parser Validators for the Symfony Validator component
License MIT
Informations about the package pdb-validator
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 to ensure no invalid hostnames are used in the Certificate's subject.
Installation
To install this package, add rollerworks/pdb-validator
to your composer.json:
Now, Composer will automatically download all required files, and install them for you.
Symfony Flex (with contrib) is assumed to enable the Bundle and add required configuration. https://symfony.com/doc/current/bundles.html
Otherwise enable the Rollerworks\Component\PdbValidator\Bundle\RollerworksPdbValidatorBundle
and the Rollerworks\Component\PdbSfBridge\Bundle\RollerworksPdbBundle
Note: Don't forget to configure the RollerworksPdbBundle
.
Requirements
You need at least PHP 8.1, and configure the PdbManager as provided by Rollerworks PdbSfBridge.
Basic Usage
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
-
The
DomainNameRegistrable
constraint has one specific optionallowPrivate
which specifies if private-prefixes (like github.io) are allowed. Default isfalse
. -
The
DomainNameSuffix
constraint has one specific optionrequireICANN
which configures whether the effective TLD requires a matching rule in a Public Suffix List ICANN Section. Default istrue
.When set to
false
the suffix is still required to exist.
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:
<major>.<minor>.<patch>
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 http://semver.org/.
License
This library is released under the MIT license.
Contributing
This is an open source project. If you'd like to contribute, please read the Contributing Guidelines. If you're submitting a pull request, please follow the guidelines in the Submitting a Patch section.
All versions of pdb-validator with dependencies
rollerworks/pdb-symfony-bridge Version ^1.0
symfony/validator Version ^6.3 || ^7.0