From 5f8674b8407b15329b49e9a44a6a4ac78f14b977 Mon Sep 17 00:00:00 2001 From: Harald Gutmann Date: Wed, 14 Sep 2016 16:24:08 +0200 Subject: [PATCH] Enable local email addresses to be valid. E.g required for local Fax submission. --- resources/functions.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/functions.php b/resources/functions.php index f17eda2a25..6c09d8c65b 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -1101,7 +1101,7 @@ function number_pad($number,$n) { // validate email address syntax if(!function_exists('valid_email')) { function valid_email($email) { - $regex = '/^[A-z0-9][\w.-]*@[A-z0-9][\w\-\.]+\.[A-z0-9]{2,6}$/'; + $regex = '/^[A-z0-9][\w.-]*@[A-z0-9][\w\-\.]+(\.[A-z0-9]{2,6})?$/'; if ($email != "" && preg_match($regex, $email) == 1) { return true; // email address has valid syntax }