validatorjs / validator.js

String validation
MIT License
23.12k stars 2.31k forks source link

Email validation #948

Open BlackRoman opened 5 years ago

BlackRoman commented 5 years ago

Validator says this email is valid, but when I trying send mail through aws.SES, there is error InvalidParameterValue: Missing local name.

But why this is valid email?

const
  validator = require("validator"),
  email = `""@example.com`;

console.log(validator.isEmail(email)); // true
BlackRoman commented 5 years ago

I tried to validate ""@example.com by other tools, like html email input and this (this is not an advertisement, only first online checker I found) https://email-checker.net, but ""@example.com is not valid.

VimLeSai commented 5 years ago

I agree ""@example.com is not valid email bcuz it contains special character "".

chriso commented 5 years ago

I think this is technically a valid email, but I'm not 100% sure.

nhanledev commented 5 years ago

The email must have at least one character before the @fdqn. I think it should be fixed.

bbirkental commented 5 years ago

Chrome marks this email as invalid: http://jsfiddle.net/vkw2o18h/

I am willing to help fix this bug. Will you accept my pool request?

beyondszine commented 5 years ago

hi @chriso, is there any rfc or some standardization format that you recommend already or are using for the valid email ? rfc6530 ? rfc5322