Email Address Expression Validation Issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi there,
I need help pls..I'm using c# on a webform and I have this regex validation
for email addresses: ValidationExpression
="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* "
I'm having isssues when submit an email with single quotes --example
jane.O'(e-mail address removed) -- I would like to be able "to allow" single quote on
the email address. Can anyone help me out !!
Thanks ahead,

Angel
 
Angel said:
Hi there,
I need help pls..I'm using c# on a webform and I have this regex
validation
for email addresses: ValidationExpression
="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* "
I'm having isssues when submit an email with single quotes --example
jane.O'(e-mail address removed) -- I would like to be able "to allow" single quote
on
the email address. Can anyone help me out !!

That single quote is not valid in an email address.

John Saunders
 
John Saunders said:
Angel said:
Hi there,
I need help pls..I'm using c# on a webform and I have this regex
validation
for email addresses: ValidationExpression
="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* "
I'm having isssues when submit an email with single quotes --example
jane.O'(e-mail address removed) -- I would like to be able "to allow" single quote
on
the email address. Can anyone help me out !!

That single quote is not valid in an email address.

John Saunders

As I've always adhered to, yet annoyingly it seems some ISPs don't behave
themselves and have handed or allowed emails with a single apostrophe.

I've come across it once in the past where I've had complaints from people
with illegal apostrophes in their addresses and them not being able to get
through my validation.
 
Back
Top