-
Improvement
-
Resolution: Fixed
-
Major
-
1.9.7, 2.3.3, 3.7
-
MOODLE_19_STABLE, MOODLE_23_STABLE, MOODLE_37_STABLE
-
MOODLE_37_STABLE
-
arjen_validate_email
-
http://en.wikipedia.org/wiki/E-mail_address
the current regular expression for valid_email function (lib/weblib.php) does not validate the domain name accordingly.
I proposed for modifying the regular expression so it matches the RFC specification.
proposed new regular expression:
preg_match('#^([^\.]([\!\#\$\%\&\'\*\+\-\/=\?\^\_`\{\|\}\~a-z0-9]+\.)*' .
|
'[\!\#\$\%\&\'\*\+\-\/=\?\^\_`\{\|\}\~a-z0-9]+)' .
|
'@' .
|
'(([a-z0-9\_\-]{1,64}\.)*[a-z0-9\_\-]{1,64})$#i',
|
$address);
|