lol /me shares your loathing for Alphabet speak, I was just being lazy, cause it's the lounge. If you care, a full explanation follows
In this case RFC is used more often then it's meaning. Sort of like ANSI. In fact when you asked, I had to look it up, because I really couldn't remember what it stands for anymore
(It's
Request For Comments if you're interested.)
At my last job I had care of a database used by the marketing department. We did a lot of mass email to our clients and they were complaining that the call center people were making keying entries which led to invalid addresses. So I went down a little rabbit role of validating said. Since there isn't really a way to test emails for validity other than self reporting, I thought at minimum they should at least be
possibly valid. A little digging around came up with
RFC 5322 Section 3.4.1 which spells out what the syntax an email address must conform to for the protocol. Since it was Access, I ended up using an input mask. This is what I came up with then, I haven't really tried to work on since then:
Code:
[Email]="" Or [Email] Is Null Or ([Email] Like "?*@?*.?*" And LenB([Email])>8 And LenB([Email])<102 And (LenB([Email])-LenB(Replace([Email],"@","")))/LenB("@")=1)
But if you are working on a web site, you would probably be using RegEx (
Regular Expressions) to solve the problem with a little more flexibility and accuracy (Example
here).