Hi,
I currently use a rather good email validation script, however, it does not validate apostrophes '.
I had a user register their email address and it was "o'connor@..."
My current validation prevented this user from using that email address.
How can I validate the use of apostrophes?
Thanks.
Email validation - apostrophe
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: Email validation - apostrophe
once the search index is back you can search for "email validation regex" for an RFC compliant version, then it's just a matter of running preg_match().
You can probably find the same thing on Google.
You can probably find the same thing on Google.
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: Email validation - apostrophe
Are apostrophes a valid email char? I have never seen it used before...
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
Re: Email validation - apostrophe
strictly, yes; it's part of the spec. Though many email servers don't allow local account creation with one.
I have seen them used, and had to fix my app to allow them.
I have seen them used, and had to fix my app to allow them.
Re: Email validation - apostrophe
Ah ok, ta. Time to modify my regex's... bugger.