Skip to content

Commit b361d13

Browse files
author
Till Brehm
committed
Allow single letter domain not tld, corrected last commit.
1 parent bf571f2 commit b361d13

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

interface/lib/classes/validate_domain.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ function web_nginx_directives($field_name, $field_value, $validator) {
191191

192192
/* internal validator function to match regexp */
193193
function _regex_validate($domain_name, $allow_wildcard = false) {
194-
$pattern = '/^' . ($allow_wildcard == true ? '(\*\.)?' : '') . '[\w\.\-]{2,255}\.[a-zA-Z0-9\-]{1,30}$/';
194+
$pattern = '/^' . ($allow_wildcard == true ? '(\*\.)?' : '') . '[\w\.\-]{1,255}\.[a-zA-Z0-9\-]{2,30}$/';
195195
return preg_match($pattern, $domain_name);
196196
}
197197

0 commit comments

Comments
 (0)