From 8cb71ab7d7c866a2b888400d932c1fbe11fd783d Mon Sep 17 00:00:00 2001 From: Jephte Clain Date: Fri, 3 May 2024 11:29:17 +0400 Subject: [PATCH] =?UTF-8?q?tel:=20ajouter=20/=20comme=20s=C3=A9parateur=20?= =?UTF-8?q?valide?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nur_src/data/types/TelephoneType.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nur_src/data/types/TelephoneType.php b/nur_src/data/types/TelephoneType.php index 8b411bf..0e20cef 100644 --- a/nur_src/data/types/TelephoneType.php +++ b/nur_src/data/types/TelephoneType.php @@ -2,7 +2,7 @@ namespace nur\data\types; class TelephoneType extends RegexpType { - const PATTERN = '/^[0-9+, .()-]+/'; + const PATTERN = '/^[0-9+, .()-\/]+/'; const PATTERN_NORMALIZED = '/^(\+?[0-9 ,]+)$/'; const COD_PAYS = [ @@ -261,7 +261,7 @@ class TelephoneType extends RegexpType { protected function extractParsedValue(array $ms) { $tel = $ms[0]; - $tel = preg_replace('/[ .()-]/', "", $tel); + $tel = preg_replace('/[ .()-\/]/', "", $tel); $tel = preg_replace('/\+/', "00", $tel); $ntel = preg_replace('/[^0-9]/', "", $tel); # tel est le numéro avec chiffres et virgule