Click here to Skip to main content
13,042,630 members (82,420 online)
Rate this:
Please Sign up or sign in to vote.
See more:

How should i validate textbox with proper email ids that is comma separated

Plz help

Posted 15-Aug-12 5:10am
Wes Aday 15-Aug-12 11:15am
Any way you want.
Kenneth Haugland 15-Aug-12 11:32am
Hey, I got edited.. :-)
Wes Aday 15-Aug-12 11:34am
Yes... sorry... kind of thought a comma might be more appropriate for a comma seperated split instead of a semicolon....
Kenneth Haugland 15-Aug-12 11:36am
No problem :)
Sergey Alexandrovich Kryukov 15-Aug-12 20:06pm
Problem is not formulated, not enough information to discuss.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Proper E-mail is quite vage term, there are several ways of doing this:[^]

for splitting the input simply use String.Split(",")
sofia3 15-Aug-12 11:49am
Hey thank you..but i want comma to be displayed automatically in textbox as soon as user enter one of the emailid
Kenneth Haugland 15-Aug-12 11:51am
i dont think you can. How about an address that ends with .com or a one that ends with ?
sofia3 15-Aug-12 12:10pm
not specific it can be both
sofia3 15-Aug-12 12:18pm
Dim rex As Match = Regex.Match(Trim(txtEmail.Text), "^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,3})$", RegexOptions.IgnoreCase)
If rex.Success = False Then
'MessageBox.Show("Please Enter a valid Email ID", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information)
ShowMessageBox("EXCLAMATION", "Data Validation", "Kindly specify a valid EmailID.", False)
Return False

Return True
End If
sofia3 15-Aug-12 12:19pm
m using above code it doesnot allow me to enter comma in textbox...i simply want to allow comma how can i do that its urgent plz help
Kenneth Haugland 15-Aug-12 12:21pm
sofia3 16-Aug-12 0:28am
it is not working dear i am not able to enter comma

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 15 Aug 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100