A domain name (or often just a “domain”) consists of one or more
components, separated by dots if more than one appears. In the case
of a top-level domain used by itself in an email address, a single
string is used without any dots.
Much better stated than I would have put it, but this is essentially my thought; It’s valid from a syntax perspective but it’s a toss up to see if mail will actually go there depending upon the circumstances.
But the question really can’t be asking about anything other than syntax. I mean, there’s no guarantee that “salnk@hotmail.com” is a valid e-mail address, either: Maybe nobody ever signed up for Hotmail under that name.
Virtually everybody gets email address validation wrong. The spec is actually extremely flexible…
Typically people use a RegEx to validate an email address; the RegEx solution is almost guaranteed to be wrong (unless they use this one.)
Anyway, this is a huge pet peeve of mind, the “defacto” email format is much, much, much more restrictive than the actual one. God help you if you have a (perfectly valid) email address with a + in it, or with the .museum top level domain.
Indeed. You have to answer them from the viewpoint of someone who is brand new to computing (which I suppose is the point of the thing). It’s a while ago, but the last time I looked at the superset of the questions that make up the test, there were quite a few “Hmmm, maybe” ones.
Probably not. From what I can tell really the only useful thing to do for e-mail validation (on a web page, for example) is check for an @, some text to the left, and some text to the right (perhaps with length-limit checking). Anything else is probably too restrictive and/or wrong.
Then make the user enter it twice to check for typos.
Then verify the e-mail my sending a confirmation that requires a response.
No; AFAIK it only implements RFC822 and not any of the newer errata. (For example, you can now use an IPv6 address as your hostname, but IPv6 didn’t exist when RFC822 was written.)
The point of the huge regex is to communicate the following:
Validating email addresses is really, really, really complex
If you think validating email addresses with RegEx is a pretty good idea, you’re simply wrong (as the page mentions, the only way THAT RegEx “works” is because he pre-processes the email address to remove comments-- comments that can be infinitely nested and therefore make validating an email address using traditional RegEx literally impossible.)
Personally, I check for a @ sign. That’s it. Then send a confirmation email. The destination’s email server is the only true authority as to whether that address exists or not, so ask it.