473,809 Members | 2,699 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Email Address Expression Validation Issue

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

Angel
Nov 22 '05 #1
2 3074
"Angel" <An***@discussi ons.microsoft.c om> wrote in message
news:3C******** *************** ***********@mic rosoft.com...
Hi there,
I need help pls..I'm using c# on a webform and I have this regex
validation
for email addresses: ValidationExpre ssion
="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* "
I'm having isssues when submit an email with single quotes --example
ja**********@ya hoo.com -- 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
Nov 22 '05 #2


"John Saunders" wrote:
"Angel" <An***@discussi ons.microsoft.c om> wrote in message
news:3C******** *************** ***********@mic rosoft.com...
Hi there,
I need help pls..I'm using c# on a webform and I have this regex
validation
for email addresses: ValidationExpre ssion
="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)* "
I'm having isssues when submit an email with single quotes --example
ja**********@ya hoo.com -- 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.
Nov 22 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

25
6516
by: Dynamo | last post by:
Hi The following script was taken from John Coggeshall's (PHP consultant) in his article on Zends site at http://www.zend.com/zend/spotlight/ev12apr.php // Get the email address to validate $email = $_POST // Use John Coggeshalls script to validate the email address if(!eregi("^+(\.+)*@+(\.+)*(\.{2,3})$", $email) { echo "The e-mail was not valid";
2
451
by: Angel | last post by:
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'brian@yahoo.com -- I would like to be able "to allow" single quote on the email address. Can anyone help me out !! Thanks ahead, Angel
117
11901
by: Steevo | last post by:
Any suggestions as to the best programs for cloaking email addresses? Many thanks -- Steevo
2
3619
by: AGGoogle | last post by:
I might be doing something stupid here but I really need some help. Can someone please tell me why can't I get this xml to pass my validation when I use XmlValidatingReader? The XMLSpy seems to accept it. XML: <?xml version="1.0" encoding="UTF-8"?> <Address> <email>x.x@x.com</email> </Address>
2
2183
by: Coleen | last post by:
I can't remember the correct way to write a custom regular expression validator, and the help file for VB.net is not terribly helpful...it does not give any real world examples. I've got the main syntax of ^ but I can't remember how to write the next portion. I need to validate passwords...they must start with a letter of the alphabet, can contain 0-9 and can contain the special characters @#$%&, I just can't remember the correct syntax to...
5
3248
by: Chris | last post by:
Based upon some prevoius postings on what to do for adding a 'add' row to a datagrid I utilize the footer to create the 'add' row. The only issue is that I have it sharing the 'UpDate_Command' and I use an argument to difference between an 'edit' vs. and 'add. But since I have field validation on both 'footer' and 'edit' columns I can't submit my edits since the footer validation kicks in.If I take the validation off then the both work fine...
35
3366
by: Mika M | last post by:
Simple question: Does Framework (1.1) contain any routine to check entered email-address is valid ? It's quite easy to make own code for that purpose, but why to do if Framework (1.1) contain this kind of routine. -- Thanks in advance! Mika
9
1900
by: chadlupkes | last post by:
I have this code from someone else, and I'm trying to make heads or tails of it because IE doesn't like it. Can anyone help? Or does anyone have a better idea? /* parse the email to check for valid form */ function parseemail(str) { str = trim(str); <?if(preg_match("/MSIE 5.0;/", $_SERVER)) // this is IE 5.0
2
2533
by: Keith G Hicks | last post by:
I'm using the following code to send out email messages to a list of people in a database. My problem is that if I'm sending to 100 people and the 40th address is bad, it crashes on that one and doesn't run the rest. I want to log the one that crashed so I can display it to the user and then continue sending to the remaining people in the list. If an address is bad, the error occurs here: EmailMsg.To.Add(New MailAddress(RecipientEmail,...
4
8777
by: JvC | last post by:
Does anyone have a good routine for EMail address validation? The one that I use is fairly primitive, and I need to beef it up. I have downloaded several from the web, and they all get screwed up by one thing or another, and tell me valid addresses are invalid. Thanks! John
0
10640
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10387
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10120
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5689
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4332
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.