Custom JS not accepting .digital TLD on form submission | Community
Skip to main content
New Participant
February 16, 2021
Solved

Custom JS not accepting .digital TLD on form submission

  • February 16, 2021
  • 1 reply
  • 2113 views

Hello,

 

we are promoting a webinar with a registration form and it looks like people with email address with this format something@x.digital are not accepted and they are getting "Please enter a valid email format" error message. Is there a way to avoid this without JS interference?

 

Best regards,

Yavor

 

Best answer by Michael_Florin-2

I assume that registration form is a Marketo form?

 

I don't believe that this error is standard Marketo form behavior. At least, I can submit that email address with no issues. So it seems more likely that you already have some kind of mechanism in place that rejects this email address domain. Could that be the case?

1 reply

Michael_Florin-2
Michael_Florin-2Accepted solution
New Participant
February 16, 2021

I assume that registration form is a Marketo form?

 

I don't believe that this error is standard Marketo form behavior. At least, I can submit that email address with no issues. So it seems more likely that you already have some kind of mechanism in place that rejects this email address domain. Could that be the case?

New Participant
February 16, 2021

Hi Michael,

 

thanks for your reply. I looked into the template and found a regex expression, preventing people from entering more than 6 letters as a domain:

var re = new RegExp(/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i);

 

I have increased the number and people should be able to register now.

 

Thanks!

SanfordWhiteman
New Participant
February 16, 2021

You actually need to get rid of that regex completely... looks like it was written by someone who didn't actually understand what valid SMTP addresses are!

 

It also blocks

 

mailbox+submailbox@example.com

sandy.o'whiteman@example.com

tom&joe@example.com

 

which are all perfectly valid addresses. You're surely discouraging your leads (possibly completely) with this filter.