private function validateDomain($domain) { return preg_match('~^([a-z0-9]+(-[a-z0-9]+)*\\.)+[a-z]{2,}$~i', $domain); }