Email Address validation

I have a person who uses a free service on our site, where it will send an epraise, but their email address fails on the validation because the ' being in it.

Bob.0'Bbob@bob-bob.org

I have never seen an email address with ' in it like this, usually admin people don't allow that sort of stuff, but I guess in this case it is acceptable. So I have to trap for it, so I was wondering what I need to do to make this work

For Javascript
if (tbEm.value.match(/^[a-z0-9][a-z0-9_\.-]{0,}[a-z0-9]@[a-z0-9][a-z0-9_\.-]{0,}[a-z0-9][\.][a-z0-9]{2,4}$/i))    {
        blnReturn = true;
    }

and for vb.net as well.

JDEE8297Asked:
Who is Participating?
 
leakim971PluritechnicianCommented:
Check here for << The Official Standard: RFC 2822 >>

Try this one :


if (tbEm.value.match(/^[a-z0-9][a-z0-9_\.-']{0,}[a-z0-9]@[a-z0-9][a-z0-9_\.-]{0,}[a-z0-9][\.][a-z0-9]{2,4}$/i))    {
        blnReturn = true;
    }

Open in new window

0
 
leakim971PluritechnicianCommented:
0
 
JDEE8297Author Commented:
thanks
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.