Click here to Skip to main content
14,982,843 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to validate phone no and mail id in window form
Posted
Comments
Uday P.Singh 4-Feb-13 3:00am
   
did u try something?

Use regular expression validation: http://msdn.microsoft.com/en-us/library/ms996428.aspx[^]
For email you can look around here for example:
http://www.regular-expressions.info/email.html[^]
http://regexlib.com/Search.aspx?k=email&AspxAutoDetectCookieSupport=1[^]
And here for phone numbers (but you will need to tailor it for your acceptable format):
http://regexlib.com/Search.aspx?k=phone[^]
   
Search online you will get regex for this easily
Here is a tool if you need to create one for yourself

http://gskinner.com/RegExr/[^]
   

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




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900