diff --git a/controllers/internalTools.php b/controllers/internalTools.php index 5942a68..4d33043 100755 --- a/controllers/internalTools.php +++ b/controllers/internalTools.php @@ -8,8 +8,8 @@ */ public static function parsePhone($number) { - $number = preg_replace('#[^0-9+]#', '', $number); - if (preg_match('#^(0|\+33)[1-9][0-9]{8}$#', $number)) + $number = preg_replace('#[^-0-9+]#', '', $number); + if (preg_match('#^(0|\+[1-9]{1,3}|\+1\-[0-9]{3})[1-9][0-9]{8}$#', $number)) { return $number; } diff --git a/templates/contacts/add.php b/templates/contacts/add.php index b17a663..517c3a0 100755 --- a/templates/contacts/add.php +++ b/templates/contacts/add.php @@ -49,7 +49,7 @@