7

If you go here, and try to input me@mail, you will see that the directive says that the email field is valid. Why is that?

3 Answers 3

17

Domains do not need to have a dot in them. What about localhost, e.g.?

root@localhost is a perfectly valid email address. And if you give a name to your system (let's say, mail), then root@mail is valid as well. And if you also have a user me, then me@mail finally is valid, too.

Sign up to request clarification or add additional context in comments.

4 Comments

Sorry that I did not specify. Exactly, I was referring to the missing dot in the domain.
No problem - I could read between the lines (at least this one time it worked ;-)).
root@localhost could be an indicator of a potential security problem.
while lacking a tld in an email address is valid per the spec, i question whether anyone would ever want to accept an email address like that. I can say with certainty that the vast majority of people want to require a tld.
2

http://en.wikipedia.org/wiki/Email_address

This wikipedia article explains thoroughly what constitutes a valid email address.

As you can see, many valid emails look very scary indeed, and probably don't pass many of the web's lesser validators.

In your case, the domain part of the email address (everything after the @), doesn't necessarily have a top-level domain. or perhaps it's entirely only a top level domain (i.e. postbox@com is valid)

Comments

0

From: https://docs.angularjs.org/api/ng/input/input%5Bemail%5D

"Note: input[email] uses a regex to validate email addresses that is derived from the regex used in Chromium. If you need stricter validation (e.g. requiring a top-level domain), you can use ng-pattern or modify the built-in validators (see the Forms guide)"

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.