From 9d8d67b13cc16ef189d6283a82917e7f0d48c93e Mon Sep 17 00:00:00 2001 From: Richard Pentecost Date: Fri, 10 May 2024 15:40:52 +0100 Subject: [PATCH] change the international telephone validator to allow hyphens in it --- datahub/core/validators/telephone.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/datahub/core/validators/telephone.py b/datahub/core/validators/telephone.py index b7181e45b..fc13b5a6f 100644 --- a/datahub/core/validators/telephone.py +++ b/datahub/core/validators/telephone.py @@ -21,10 +21,10 @@ class InternationalTelephoneValidator(RegexValidator): Validator for international telephone numbers. Validates that phone number is composed of characters found in telephone numbers - - 0-9, a space or open / close brackets - optionally preceded with a plus sign. + 0-9, a space, hyphens, or open / close brackets - optionally preceded with a plus sign. """ - regex = r'^\+?[\d() ]{1,}$' + regex = r'^\+?[\d() -]{1,}$' message = 'Phone number must be composed of numeric characters.'