mirror of
https://github.com/getnamingo/registry.git
synced 2025-05-17 01:57:00 +02:00
More bugfixes
This commit is contained in:
parent
abde99e73e
commit
439995baaf
5 changed files with 27 additions and 21 deletions
|
@ -191,6 +191,9 @@ function validate_label($label, $pdo) {
|
|||
if (strlen($label) < 2) {
|
||||
return 'Total length of your domain must be greater then 2 characters';
|
||||
}
|
||||
if (strpos($label, '.') === false) {
|
||||
return 'Invalid domain name format, must contain at least one dot (.)';
|
||||
}
|
||||
if (strpos($label, 'xn--') === false && preg_match("/(^-|^\.|-\.|\.-|--|\.\.|-$|\.$)/", $label)) {
|
||||
return 'Invalid domain name format, cannot begin or end with a hyphen (-)';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue