Skip to content
Snippets Groups Projects
Commit bf571f26 authored by Till Brehm's avatar Till Brehm
Browse files

Allow single letter domain tld

parent a02ec6b0
No related branches found
No related tags found
No related merge requests found
......@@ -191,7 +191,7 @@ class validate_domain {
/* internal validator function to match regexp */
function _regex_validate($domain_name, $allow_wildcard = false) {
$pattern = '/^' . ($allow_wildcard == true ? '(\*\.)?' : '') . '[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{2,30}$/';
$pattern = '/^' . ($allow_wildcard == true ? '(\*\.)?' : '') . '[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{1,30}$/';
return preg_match($pattern, $domain_name);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment