Comment by ButlerianJihad
1 hour ago
> foo@example.com wasn't a valid email address
That's an interesting case. Did you consider this a correct result?
On one hand, <foo@example.com> is a valid hypothetical address that can be used strictly in documentation. It is also syntactically valid, which is the best kind of valid. However, <foo@example.com> (and all its permutations) is an obviously invalid actual address if you're trying to send email to it, or manipulate it in any real way on the Internet.
It's a good sanity check, but quite pedantic. I can understand if you are validating some public input form, where people are likely to put fake email addresses, and you don't want someone knowingly filling in <blah@example.com> because you also know, a priori it's a fake, and it will waste your time validating or trying to send to it.
No comments yet
Contribute on Hacker News ↗