-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Description
Hi,
I noticed that spaces are accepted before the @ sign of the email address, values such as "jo [email protected]", "john. [email protected]" or "john.doe @example.com" are not flagged as invalid, here is an example of result obtained:
jo [email protected]:
{
"valid": true,
"validators": {
"regex": {
"valid": true
},
"typo": {
"valid": true
},
"disposable": {
"valid": true
},
"mx": {
"valid": true
},
"smtp": {
"valid": true
}
}
}
This test is done with the following code:
async function checkEmail( email: string ) {
const valid = await validate({
email: email,
sender: email,
validateRegex: true,
validateMx: true,
validateTypo: true,
validateDisposable: true,
validateSMTP: false,
});
logger.error( `${email}:\n${JSON.stringify( valid, null, 2)}` );
}
I would expect it to fail at the regexp stage. For sure an address with a space in that part is refused by email servers.
Let me known if you need any more details.
Denis
Metadata
Metadata
Assignees
Labels
No labels