Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

Forms email field validation with user@someword fails #9463

Closed
rootical opened this issue Oct 7, 2014 · 1 comment
Closed

Forms email field validation with user@someword fails #9463

rootical opened this issue Oct 7, 2014 · 1 comment

Comments

@rootical
Copy link

rootical commented Oct 7, 2014

Somehow it's valid. You could check it at angular documentation page.
Or here: http://plnkr.co/edit/VoWzqiOfD8xMaBU70RJp?p=preview

Thank you all.

@caitp
Copy link
Contributor

caitp commented Oct 7, 2014

user@someword is a valid email address, per the RFCs and W3/WHATWG recommendations --- no web browser which implements constraint validation will invalidate such an email address. The most common email address in the world for unix systems (root@localhost) would be invalid if we required a TLD. This does not mean that the email can be resolved, and it does not mean the email exists (or is even likely to exist) --- it is still valid.

People don't understand this and frequently raise this issue --- the right thing to do is to include a separate validator which will perform a subsequent validation, for the needs of your application.

This can be done using either a custom directive, or by using ng-pattern or similar to achieve what you're looking for.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants