Fixed issue with city naming

This commit is contained in:
Pinga 2025-02-14 10:46:38 +02:00
parent 621976f11a
commit 483554762a
3 changed files with 4 additions and 4 deletions

View file

@ -102,7 +102,7 @@ function processContactCreate($conn, $db, $xml, $clid, $database_type, $trans) {
}
}
if (preg_match('/(^\-)|(^\.)|(\-\-)|(\.\.)|(\.\-)|(\-\.)|(\-$)|(\.$)/', $postalInfoIntCity) || !preg_match('/^[a-z][a-z\-\.\s]{3,}$/i', $postalInfoIntCity)) {
if (preg_match('/(^\-)|(^\.)|(\-\-)|(\.\.)|(\.\-)|(\-\.)|(\-$)|(\.$)/', $postalInfoIntCity) || !preg_match('/^[a-z][a-z\-\.\'\s]{2,}$/i', $postalInfoIntCity)) {
sendEppError($conn, $db, 2005, 'Invalid contact:city', $clTRID, $trans);
return;
}