如何以窗口形式验证电话号码和邮件ID [英] How to validate phone no and mail id in window form
本文介绍了如何以窗口形式验证电话号码和邮件ID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何以窗口形式验证电话号码和邮件ID
How to validate phone no and mail id in window form
推荐答案
使用正则表达式验证:http://msdn.microsoft.com/en-us/library/ms996428.aspx [ ^ ]
对于电子邮件,您可以在这里查看例如:
http://www.regular-expressions.info/email.html [ ^ ]
http://regexlib.com/Search.aspx?k=email&AspxAutoDetectCookieSupport=1 [ ^ ]
这里有电话号码(但你会请根据您的可接受格式进行定制):
http://regexlib.com/Search。 aspx?k =手机 [ ^ ]
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[^]
在线搜索你会得到这方面的正则表达式
如果你需要自己创建一个工具这是一个工具
http://gskinner.com/RegExr/ [ ^ ]
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/[^]
这篇关于如何以窗口形式验证电话号码和邮件ID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文