Rest API - Email validation | Community
Skip to main content
New Participant
November 2, 2021
Solved

Rest API - Email validation

  • November 2, 2021
  • 1 reply
  • 3155 views

Hello,

 

I am using the /rest/v1/leads.json endpoint to sync leads, and sometimes I get errors about the email format (Invalid value for field 'email').
Would it be possible to get the exact regular expression used on Marketo side for the email dataType?
This would help align with the client-side validation and make sure no leads are missed.


Thanks !

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SanfordWhiteman

I don’t understand what you mean by “only invalid email addresses are rejected.“

 

This isn’t true: via API, Marketo does reject RFC-valid addresses, such as a single-label domain (right-hand-side) or a quoted left-hand-side with whitespace.

1 reply

SanfordWhiteman
New Participant
November 2, 2021
Are you having RFC-compliant email addresses rejected? Can you give some examples?
New Participant
November 8, 2021

Thanks for the reply!
No, only invalid email addresses are rejected, so no problem on Marketo side.


What I want is to reject invalid email addresses before they are sent to Marketo, to make sure the user corrects it in my form, but I can't rely on the Marketo error response at the time the user is on the form (data is sent to Marketo afterwards).


I try to enhance the regExp following each new Marketo rejection, so eventually both will be aligned, but it would be easier for me to get the perfect regExp already, if it's possible 🙂

SanfordWhiteman
SanfordWhitemanAccepted solution
New Participant
November 8, 2021

I don’t understand what you mean by “only invalid email addresses are rejected.“

 

This isn’t true: via API, Marketo does reject RFC-valid addresses, such as a single-label domain (right-hand-side) or a quoted left-hand-side with whitespace.