The Domain Validation extension is so simple it's just validate if the domain is true or false by checking the DNS
Requirements ¶
checkdnsrr() function must work
Usage ¶
simply as the url below DomainForm.php
array('domain', 'ext.validators.DomainValidator' , 'type'=>self::DNS_NS)
you just need to verify the constant
const DNS_A = 'A'; // this will check for the domain Dns A record
const DNS_MX = 'MX'; // This will check for MX Records
const DNS_NS = 'NS'; // This will check for the NS Records
Note: you can just use 'A' , 'MX' or 'NS' instead of self::DNS_NS
as you will see at the repository all the files will found controller , view , model and the DomainValidator extension at their right path just download and extract them in the protected directory
Resources ¶
- [Project page] [https://www.php-codes.com/projects/domainvalidate](https://www.php-codes.com/projects/domainvalidate "https://www.php-codes.com/projects/domainvalidate")
- [project Repo] [https://www.php-codes.com/projects/domainvalidate/repository](https://www.php-codes.com/projects/domainvalidate/repository "https://www.php-codes.com/projects/domainvalidate/repository")
- [Try out a demo] is not available yet (I will Update this later)
The Download !!
The Download File is just contain the Validator file
you just make it in the true path
protected/extensions/validators/DomainValidator.php
as you can see in the repository
Useful
This is nice idea. Just because someone puts an @ in a string doesn't mean it's a valid email adress, so this can be really useful, thanks.
If you have any questions, please ask in the forum instead.
Signup or Login in order to comment.