From 2024702171cac07cf16b1a6c3f7fb8c0643c496d Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 18 May 2010 09:42:11 +0000 Subject: [PATCH] Updated phoneNumber test git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18527 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/utils/class_tests.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gosa-core/include/utils/class_tests.inc b/gosa-core/include/utils/class_tests.inc index 2e5eab2f7..e1f87a0d4 100644 --- a/gosa-core/include/utils/class_tests.inc +++ b/gosa-core/include/utils/class_tests.inc @@ -40,7 +40,8 @@ class tests { return (TRUE); } - return preg_match ("/^[\/0-9 ()+*-]+$/", $nr); + // We require at least one numeric character in the number string. + return preg_match ("/^[\/0-9 ()+*-]*[0-9]{1}[\/0-9 ()+*-]*$/", $nr); } -- 2.30.2