User Email Validation

Hi,

I've noticed that your User Email verification is more strict than most common JavaScript validators. this is causing sometimes conflicts in registering users to our site. ( for examples [email blocked] is not passed )

Can you please provide your email validation rules ? if possible having your regex format would be great.

Regards,

Ran Cohen

  1. Hi Ran --

    Our email validation is not only regex. It includes a complex regex for the local part -- chars left of the @ must be valid local part chars in a valid format. The hostname is validated separately. It also is complex and includes a check against known valid set of TLDs.

    In short, [email blocked] is not valid since .con is not a valid TLD.

  2. Hi Marc,

    Thanks for responding,

    The problem is that our initial Email validation doesn't include TLD validation which cause conflicts since we are creating users on CG only after getting their initial info thus failures are caused in a place that users can no longer get informed for entering an invalid email address.

    1. Is there a way to contact Chedder API only for validating an email without creating user?
    2. OR, do you femilar with a service that would validate the email the same way you do ?

    Best,

    Ran

  3. There are countless libraries out there for validating an email address. Some are better than others. What's your primary programming language? Are you using a framework of any kind?

  4. AnglarJs/Javescript.

    We are using currently angularjs Email validation, however What Im concerned about is having a validation that would match yours 100% to avoid further failures of user creation due to different email validation process.

  5. I'm familiar with Angular but I don't have direct experience with it's email validator. Based on my cursory research, it appears that Angular uses a simple regex based on Chromium's validation for the email input type. Technically, addresses without a TLD or with an invalid TLD are valid email addresses (e.g., root@localhost). However, CG doesn't accept email addresses with IP or local hostnames. CG also checks the hostname part against a known list of valid TLDs. This is fairly standard and I expect that there are good client-side validators that do this.

    You might consider writing your own Angular directive that includes a check for valid TLD. I suspect that there's something out there in the wild already.

  6. Meghan Turner closed this discussion on 06 Jul, 2016 08:09 PM.

Discussions are closed to public comments.
If you need help with Cheddar please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions