Yii 1.1: domainvalidate

Validate if domain is true or not

The Domain Validation extension is so simple it's just validate if the domain is true or false by checking the DNS


checkdnsrr() function must work


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


Total 2 comments

#9542 report it
Haensel at 2012/08/22 04:34am

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.

#9348 report it
Mohamed Alsemany at 2012/08/05 11:55pm
The Download !!

The Download File is just contain the Validator file you just make it in the true path


as you can see in the repository

Leave a comment

Please to leave your comment.

Create extension