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.
Solved! Go to Solution.
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 🙂
Thanks for this information, it's good to know.
This makes the Marketo email validation even more mysterious, that's why it would be nice to have it documented somewhere, so developers could anticipate the behaviour and improve their client-side email validation.
Agreed, it’s doubly frustrating because not all input methods use the same validation. A Marketo form post is not as strict, conforming more to the actual RFC. But the stricter validation is not officially documented.