validatorjs / validator.js

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

isEmail: Zero width space allowed #940

Open sandorvasas opened 5 years ago

sandorvasas commented 5 years ago

We just run into a problem with isEmail. Someone copied a mail address from a website which was prefixed with a zero width space unicode character (200B ?)

The validator let it through.

simonratner commented 5 years ago

Also, 'REPLACEMENT CHARACTER' (U+FFFD) is accepted in the domain part. It used to be rejected in validator@3.22.2 (and possibly later versions).

Example: user@example.com�