weblib: validate_email() -- emails with a trailing dot in the local-part ([email protected]) are invalid
This commit is contained in:
+2
-1
@@ -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{|}~]+$',
|
||||
|
||||
Reference in New Issue
Block a user