validator.js
validator.js copied to clipboard
NormalizeEmail returns invalid data
v = require 'validator'
v.isEmail '[email protected]'
true
v.normalizeEmail '[email protected]'
'@gmail.com'
I don't think that's a valid Gmail address. Gmail strips the part after + when determining the destination mailbox, e.g. email to [email protected] and [email protected] both get delivered to me at [email protected].
@chriso yes that isn't a valid address. But the problem here is, normalizeEmail is not working as intended. It is removing the local part altogether.