Check whether Entered email is valid or not


#1

We could validate an email id by using Js, that’s the normal case. But What I need is when I type an email, I want to check the existence of that email ID.

e.g.: imsreenathpnair@gmail.com is existing, but imsreenath.p.nair@gmail.com does not exist. So if my accidentally type like the second one, then I have to show that the email is not exist or not valid. How could I implement such a case?


#2

Validating email addresses is a bit outside the scope of Ember. And further, trying to validate email addresses programmatically is unreliable and fraught with pitfalls. I’ll save you some time an effort of trying complex regexes and various services that check mail servers’ mx records and so on, and tell you: The best way to validate an email is to accept something that “looks” like an email address and try sending something to it.

Here are some resources that explain better than I can the perils of validating email addresses: