Bug Hunt: Email validation evaluates shouldbe@invalid as true#369
Bug Hunt: Email validation evaluates shouldbe@invalid as true#369warbrett wants to merge 1 commit intohapijs:masterfrom
Conversation
|
Not anymore with all the custom domain names. |
|
Can we reconsider this? Even with the profusion of new TLDs it is still impossible to have an email address of the form name@oneword; technically an email address like user@localhost is valid but that seems like an edge case that would never arise in a real-world site, while somebody omitting the ".com" from their email address is a relatively common error. Suggest a regex that requires at least one character on either side of at least one period after the @ would resolve this without requiring an exhaustive list of TLDs. |
|
@hueniverse sorry for the delay.
I guess I could add a |
|
What's considered valid? Would be useful to have a flag that we can use to meet expectations. |
|
The intended use is to validate the domain using the I would really prefer not to include a hardcoded list of valid top-level domains to validate against, but I don't really see any other way. That shouldn't be a difficult change to make, but feel free to submit a pull request. |
|
@skeggse would you rather I checked for tld outside of isemail? |
|
@seldo: worth mentioning that the email address @hueniverse I added a |
|
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions. |
TLD should be required...