From 12580cfe0ed2dce1b69926eca2199858a7740c0d Mon Sep 17 00:00:00 2001 From: Jos Poortvliet Date: Wed, 24 Aug 2016 16:34:15 +0200 Subject: [PATCH] relax phone nr check --- page-contactsubmit.php | 2 +- page-providersubmit.php | 2 +- page-salessubmit.php | 2 +- page-securesharesubmit.php | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/page-contactsubmit.php b/page-contactsubmit.php index 41e52199..d32de23a 100644 --- a/page-contactsubmit.php +++ b/page-contactsubmit.php @@ -29,7 +29,7 @@ if(isset($_POST['email'])) { if(!preg_match($string_exp,$yourname)) { $error_message .= 'The name you entered does not appear to be valid.
'; } - $string_exp = "/^((\+|00)\d{1,3})?\d+$/"; + $string_exp = "/^((\+|00)\d{1,3})?(\d+|\s+)+\d$/"; if(!preg_match($string_exp,$phone)) { $error_message .= 'The phone number you entered does not appear to be valid, did you add a country code like +49?
'; } diff --git a/page-providersubmit.php b/page-providersubmit.php index 22be3292..dbb3a899 100644 --- a/page-providersubmit.php +++ b/page-providersubmit.php @@ -45,7 +45,7 @@ if(isset($_POST['email'])) { if(!preg_match($string_exp,$organization)) { $error_message .= 'The organization you entered does not appear to be valid.
'; } - $string_exp = "/^((\+|00)\d{1,3})?\d+$/"; + $string_exp = "/^((\+|00)\d{1,3})?(\d+|\s+)+\d$/"; if(!preg_match($string_exp,$phone)) { $error_message .= 'The phone number you entered does not appear to be valid, did you add a country code like +49?
'; } diff --git a/page-salessubmit.php b/page-salessubmit.php index 98ff4d1e..2a26060b 100644 --- a/page-salessubmit.php +++ b/page-salessubmit.php @@ -29,7 +29,7 @@ if(isset($_POST['email'])) { if(!preg_match($string_exp,$yourname)) { $error_message .= 'The name you entered does not appear to be valid.
'; } - $string_exp = "/^((\+|00)\d{1,3})?\d+$/"; + $string_exp = "/^((\+|00)\d{1,3})?(\d+|\s+)+\d$/"; if(!preg_match($string_exp,$phone)) { $error_message .= 'The phone number you entered does not appear to be valid, did you add a country code like +49?
'; } diff --git a/page-securesharesubmit.php b/page-securesharesubmit.php index f0d4f012..c4ccbff4 100644 --- a/page-securesharesubmit.php +++ b/page-securesharesubmit.php @@ -29,7 +29,7 @@ if(isset($_POST['email'])) { if(!preg_match($string_exp,$yourname)) { $error_message .= 'The name you entered does not appear to be valid.
'; } - $string_exp = "/^((\+|00)\d{1,3})?\d+$/"; + $string_exp = "/^((\+|00)\d{1,3})?(\d+|\s+)+\d$/"; if(!preg_match($string_exp,$phone)) { $error_message .= 'The phone number you entered does not appear to be valid, did you add a country code like +49?
'; }