Validator.js: isEmail return false for valid google mail

Created on 19 Jun 2018  路  4Comments  路  Source: validatorjs/validator.js

Current Behaviour

> isEmail('[email protected]');
false

> normalizeEmail('[email protected]');
'[email protected]'

> validator.version
'10.2.0'

Expected Behaviour

> isEmail('[email protected]');
true

Most helpful comment

isEmail returns false for [email protected], [email protected]. But for [email protected], [email protected], [email protected] it returns true. Only gmail usernames are making this. [email protected], [email protected] works fine.

All 4 comments

I don't believe that gmail will allow for an underscore in the address. I know that periods are ignored. If I change your email to justen.[email protected], it validates perfectly.

You are right!
Gmail only accepts periods.
Thanks. :+1:

isEmail returns false for [email protected], [email protected]. But for [email protected], [email protected], [email protected] it returns true. Only gmail usernames are making this. [email protected], [email protected] works fine.

Faker is the package in the wrong, but if you need an immediate fix go back to validator v9

Was this page helpful?
0 / 5 - 0 ratings

Related issues

malkhuzayyim picture malkhuzayyim  路  4Comments

rathboma picture rathboma  路  4Comments

AtomicBorg picture AtomicBorg  路  3Comments

RPDeshaies picture RPDeshaies  路  4Comments

mum-never-proud picture mum-never-proud  路  4Comments