mirror of
https://github.com/getnamingo/registry.git
synced 2025-08-03 16:21:50 +02:00
RST improvements
This commit is contained in:
parent
d755704917
commit
6528ad6530
4 changed files with 86 additions and 141 deletions
|
@ -268,8 +268,11 @@ function validate_label($domain, $db) {
|
|||
}
|
||||
} else {
|
||||
// Prevent consecutive or invalid hyphen usage
|
||||
if (preg_match('/--|\.\./', $label)) {
|
||||
return 'Domain labels cannot contain consecutive dashes (--) or dots (..)';
|
||||
if ($label !== $labels[0] && preg_match('/\.\./', $label)) {
|
||||
return 'Domain labels cannot contain consecutive dots (..)';
|
||||
}
|
||||
if (preg_match('/^..--/', $label)) {
|
||||
return 'Domain labels cannot have double hyphens at position 3 and 4';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue