Solved! Go to Solution.
how do you get marketo just to validate it has the right email form, meaning
no special characters, contains an @ and ends with a dot something. It seems like the form designer has an error message for invalid email, but you can enter in something with out the doman e.g. persona@marketo
the problem with this is when it syncs with salesforce, SFDC throws an error
Technically persona@marketo is a valid email address. It may not be routable on the public internet, but it's valid (in fact most early email addresses had exactly this form, because they were relayed between hosts with simple names).
I agree that in the case of a marketing form it shouldn't be allowed, but this is just one of the myriad problems with thinking email validation is a simple test for "no special characters." There is no specification (as in Internet standard/RFC) that will parallel exactly what you expect, so you have to make up a non-standard -- either less or more stringent but at the same time somewhat arbitrary -- set of validation rules.
I recommend you start by implementing my solution at the base of this post: Re: How to correct typos in email addresses? By default, this code will check if the TLD is valid. We can go deeper with it and check to see if the domain has an MX record... which you might think would suffice, but actually you have to see if it has an A record as well. Beyond that, of course, is actual real-time email validation by attempting to connect to the remote server. But those services cost $$.
The odd thing is that while Marketo's form will allow an email address like persona@marketo, their email server won't send it, the field on the lead record has a red squiggly line under it and the same happens when you enter it into a report subscription.
I agree, inconsistency in different parts of the same app is itself a problem. I was just trying to show that gut feelings about the range of truly valid email addresses are usually wrong. This applies to the publicly usable addresses as well. Back in the day, when testing mail servers, we used to use the address literal form a lot -- firstname.lastname@example.org -- but few people understand that's a totally legit pattern. Same with quoted addresses with spaces, and punycode. One of the most easily fixable mistakes, in my experience, is made-up length restrictions. The would-be "geek" site Newegg.com has a 40-character limit, I think, so I had to create an alias just for them... sigh.
Anyway, doing validation against a standards-based mail server is the happy side effect (latency notwithstanding) of validating email addresses. The "shortcut" to knowing if an email address format is legit is checking to see if it can receive mail!