User Email Validation

rotem cohen's Avatar

rotem cohen

30 Nov, 2015 10:08 AM

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. Support Staff 1 Posted by Marc Guyer on 30 Nov, 2015 02:08 PM

    Marc Guyer's Avatar

    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. 2 Posted by Ran Cohen on 01 Dec, 2015 07:28 AM

    Ran Cohen's Avatar

    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. Support Staff 3 Posted by Marc Guyer on 01 Dec, 2015 01:46 PM

    Marc Guyer's Avatar

    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. 4 Posted by rotem cohen on 01 Dec, 2015 02:01 PM

    rotem cohen's Avatar

    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. Support Staff 5 Posted by Marc Guyer on 01 Dec, 2015 02:25 PM

    Marc Guyer's Avatar

    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

28 Mar, 2024 10:45 PM
24 Jan, 2024 08:33 AM
11 Jan, 2024 07:13 AM
30 Nov, 2023 02:07 AM
22 Nov, 2023 08:41 AM