validate_domain can start with numbers
This commit is contained in:
parent
68a8af5409
commit
6a1411bb51
|
@ -30,7 +30,7 @@ function vhost::set-phpVersion () {
|
|||
# crude but good enough domain name format validation
|
||||
function vhost::validate_domain () {
|
||||
local my_domain=$1
|
||||
if [[ $my_domain =~ ^(([a-zA-Z](-?[a-zA-Z0-9])*)\.)+[a-zA-Z]{2,}$ ]] ; then
|
||||
if [[ $my_domain =~ ^(([a-zA-Z0-9](-?[a-zA-Z0-9])*)\.)+[a-zA-Z]{2,}$ ]] ; then
|
||||
return 0
|
||||
else
|
||||
return 1
|
||||
|
|
Loading…
Reference in New Issue
Block a user