laxcorp / fqdn-validator-bundle
For Symfony's validator Fully Qualified Domain Name.
Installs: 598
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.2
README
For Symfony's Validator component to test if a value is a valid Fully Qualified Domain Name.
Install
composer require laxcorp/fqdn-validator-bundle
Add in app/AppKernel.php
$bundles = [ new LaxCorp\FqdnValidatorBundle\FqdnValidatorBundle() ]
catalog_cname: 'catalog.domain.ru'
catalog_domain_suffix: '.catalog.domain.ru'
Use in Entity
use LaxCorp\FqdnValidatorBundle\Validator\Constraints\FqdnEntity;
/** * * @ORM\Entity * * @FqdnEntity( * fieldFqdn="domain", * ignoreNull=true * ) */ class ...