/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function isValidDomain($value) { if($value) { //Max 255 chars return false; } //Remove trailing . } //More than 2 labels foreach($labels as $label) { //Cannot start or end with a - return false; } //Allowed characters a-z, 0-9, - return false; } } } else { return false; } return true; } return false; }
Comments
