--- classes/form/validation/FormValidatorEmail.inc.php 2009-07-10 20:06:05.000000000 -0300 +++ classes/form/validation/FormValidatorEmail.inc.php 2009-07-10 20:15:20.000000000 -0300 @@ -21,6 +21,8 @@ class FormValidatorEmail extends FormValidatorRegExp { function getRegexp() { + $allow_none = Config::getVar('email', 'allow_none'); + $atom = '[-a-z0-9!#\$%&\'\*\+\/=\?\^_\`\{\|\}~]'; // allowed characters for part before "at" character $domain = '([a-z0-9]([-a-z0-9]*[a-z0-9]+)?)'; // allowed characters for part after "at" character $regex = '^' . $atom . '+' . // One or more atom characters. @@ -29,7 +31,11 @@ '(' . $domain . '{1,63}\.)+'. // Followed by one or max 63 domain characters (dot separated). $domain . '{2,63}'. // Must be followed by one set consisting a period of two '$'; // or max 63 domain characters. - return '/' .$regex. '$/i'; + + if (!$allow_none) + return '/' .$regex. '$/i'; + else + return '/(' . $regex . '|none)$/i'; } /** --- config.inc.php 2009-07-10 20:25:26.000000000 -0300 +++ config.inc.php 2009-07-10 20:19:46.000000000 -0300 @@ -248,6 +248,9 @@ ; Display an error message when an email is not successfully sent display_errors = On +; Disables the regex check for email submission fields and accepts the value of "none" instead +allow_none = On + ;;;;;;;;;;;;;;;;;;; ; Search Settings ; ;;;;;;;;;;;;;;;;;;;