Yii 1.1: domainvalidate

Validate if domain is true or not
2 followers

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

Total 2 comments

#9542 report it
Haensel at 2012/08/22 04:34am
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.

#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

protected/extensions/validators/DomainValidator.php

as you can see in the repository

Leave a comment

Please to leave your comment.

Create extension