Reply
Highlighted
Member
Posts: 1
Registered: ‎06-29-2017

Email Regex Standards Accepted

We recently changed the regex email standards to allow email adresses to have the following items:

^(?(")(".+?(?<!\\)"@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^{}|~\w]))(?<=[0-9a-z])@))(?([)([(\d{1,3}.){3}\d{1,3}])|(([0-9a-z][-\w][0-9a-z]*.)+[a-z0-9][-a-z0-9]{0,22}[a-z0-9]))$

 

We want to make sure that user's email addresses will still be accepted by authroize.net. Is there anywhere to find the standards accepted for email adressess?

Highlighted
All Star
Posts: 699
Registered: ‎11-03-2016

Re: Email Regex Standards Accepted

Hi @jneidish,

 

For email address sent as part of transactions, the only constraint our system has is string of max length 255. There's no additional validation done. So, for example, sending an email field with the value of "Hey, I don't really remember my email address. Maybe it was gmail.com?" would be accepted.

 

Obviously, that's not useful to you to use later, so we do recommend that you do some validation on your end if you want this field to be populated with useful values. That's what you're already doing with your regex, so, great!