Skip to content
Browse files

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

…(user.@host.com) are invalid as per rfc822
  • Loading branch information...
1 parent e8b7194 commit 77a08a9c439e2536d850399b17393879f0fc9161 martinlanghoff committed
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/weblib.php
View
3 lib/weblib.php
@@ -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.
Something went wrong with that request. Please try again.