Enable local email addresses to be valid. E.g required for local Fax submission.
This commit is contained in:
parent
cf39ea04d9
commit
5f8674b840
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue