From 65b620370014467303021c4d4db939e5af3e9d0b Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Wed, 19 Mar 2003 17:34:27 +0000 Subject: - Another improvement to the e-mail address validation code. Fixed Debian bug #185217. Patch by Gerhard. --- modules/user.module | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'modules/user.module') diff --git a/modules/user.module b/modules/user.module index f4ebe3fbd..8dd81ae35 100644 --- a/modules/user.module +++ b/modules/user.module @@ -184,10 +184,10 @@ function user_validate_mail($mail) { /* ** Verify the syntax of the given e-mail address. Empty e-mail addresses - ** allowed. + ** allowed. See RFC 2822 for details. */ - $user = '[a-zA-Z0-9_\-\.\+]+'; + $user = '[a-zA-Z0-9_\-\.\+\^!#\$%&*+\/\=\?\`\|\{\}~\']+'; $domain = '(?:[a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]\.?)+'; $ipv4 = '[0-9]{1,3}(\.[0-9]{1,3}){3}'; $ipv6 = '[0-9a-fA-F]{1,4}(\:[0-9a-fA-F]{1,4}){7}'; -- cgit v1.2.3