Learn, Share, Build

193
October 13, 2017, at 10:59 PM

I am trying to figure out a way to validate whether or not an email address is correct. And before you show me the c# emailaddressvalidator or a regex js func, It specifically shouldn't check if correct format - but rather if someone made a spelling mistake.

For example: some.user@gnail.com Here, the user probably meant gMail.

I know there probably isn't a good solution here, but hopefully someone here might know more.

Thanks

Answer 1

Check for the valid email service names (gmail, yahoo, hoptmail) with the string after '@' and before '.'. Create a hashmap/array, Store all the services names inside it and check if array/hashmap contains the string after '@' and before '.'. You can do same for extensions such as com, co, in.

READ ALSO
Learn, Share, Build

Learn, Share, Build

I have a JavaScript array, which I want to convert to JSONThe thing is that I don't know what will be in the array, cause it's a calculator, that depends on the user

248
Learn, Share, Build

Learn, Share, Build

I got a template to display for a form result, it loads the data but skips the part where it loads the css/js part, in Symfony 14

169
Learn, Share, Build

Learn, Share, Build

i come from a rails background, but have been work/learning javascript ecosystem for last few monthsSo i'm a novice here

195
Learn, Share, Build

Learn, Share, Build

I have an (SharePoint Framework) react example using a rest callWorking fine

220