weblib: validate_email() -- emails with a trailing dot in the local-part ([email protected]) are invalid

This commit is contained in:
martinlanghoff
2006-04-20 22:32:00 +00:00
parent 1ffd3647bd
commit 78fbaeaeed
+2 -1
View File
@@ -1054,7 +1054,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{|}~]+$',