validator.js
validator.js copied to clipboard
Falsely validates multiple TLDs
Describe the bug
When v
alidating a wrong [email protected] email with isEmail(email) I get a succesfuly validation. I understand that multiple tlds are possible in the wild (.co.uk) but more than two should not validate successfully. Better even would be only official TLDs get vaidated.
Examples
console.log(isEmail('[email protected]'))
> true
Additional context Validator.js version: 13.7 Node.js version: 17 OS platform: linux
Not sure if this is a bug though. It only recognizes the last .de as TLD and the second to last as domain name. The rest can all be prefixes, right? See it as a larger extension of www.mail.example.com Or is there a limit to that extension?