Improved domain validation in CP as well

This commit is contained in:
Pinga 2025-02-11 10:44:27 +02:00
parent 8428a05bfb
commit 657373519f
2 changed files with 53 additions and 53 deletions

View file

@ -203,7 +203,7 @@ function validate_label($domain, $pdo) {
}
if (!preg_match('/^[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9]$/', $label)) {
return 'Each domain label must start and end with an alphanumeric character';
return 'Each domain label must start and end with a letter or number and contain only letters, numbers, or hyphens';
}
// Check if it's a Punycode label (IDN)