Permalink
Browse files

weblib:validate_email() - emails with trailing dot in the local-part …

…(user.@host.com) are invalid as per rfc822
  • Loading branch information...
martinlanghoff
martinlanghoff committed Apr 20, 2006
1 parent e8b7194 commit 77a08a9c439e2536d850399b17393879f0fc9161
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/weblib.php
View
@@ -914,7 +914,8 @@ function formerr($error) {
*/
function validate_email($address) {
- return (ereg('^[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+'.
+ return (ereg('^[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+'.
+ '(\.[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+)*'.
'@'.
'[-!#$%&\'*+\\/0-9=?A-Z^_`a-z{|}~]+\.'.
'[-!#$%&\'*+\\./0-9=?A-Z^_`a-z{|}~]+$',

0 comments on commit 77a08a9

Please sign in to comment.