在电子邮件发送中验证CC,Bcc [英] Validation for CC,Bcc in Email sending
问题描述
i希望验证cc,bcc发送电子邮件(邮件分隔,)。目前我使用以下代码验证
i want to validate cc,bcc for sending email(mails seperated by ,).presently i am using the below code to validate
<stringlengthvalidator(0,2000)> _
<validatorcomposition(microsoft.practices.enterpriselibrary.validation.compositiontype.or)> _
<regexvalidator("^(\s*,?\s*[0-9a-za-z]([-.\w]*[0-9a-za-z])*@([0-9a-za-z][-\w]*[0-9a-za-z]\.)+[a-za-z]{2,9})+\s*$",MessageTemplate:="EmailObject_009")> _
Public Property MailBCC() As String
如果我只保留0并删除2000则它不起作用工作正常。但我想检查上边界范围...
我该怎么做...
Here it is not working if i keep only 0 and remove 2000 then it is working fine .but i want to check upper boundaryrange also ...
how should i do this...
推荐答案
,MessageTemplate:=EmailObject_009)> _
Public Property MailBCC()As String
",MessageTemplate:="EmailObject_009")> _ Public Property MailBCC() As String
这里没有工作,如果我只保留0并删除2000然后它工作正常。但我想检查上边界范围也...
应该怎么做我这样做...
Here it is not working if i keep only 0 and remove 2000 then it is working fine .but i want to check upper boundaryrange also ...
how should i do this...
试试这个网站。
Regex Tester [ ^ ]
Try this site.
Regex Tester[^]
Your regular expression:
^(\s*,?\s*[0-9a-za-z]([-.\w]*[0-9a-za-z])*@([0-9a-za-z][-\w]*[0-9a-za-z]\.)+[a-za-z]{2,9})+\s*
你的测试字符串:
bhuvan2001 @gmail .com
如果输入的邮件ID或竞争不匹配,则显示[未找到匹配],因此我们必须更改表达式以进行验证根据我们的要求。
如果模式& Entereted内容匹配,然后它将显示可以接受的所有可能值。
If the Entered mail ID or contect is not matching then shows ["No Match Found"], so we have to change the expression to validate as per our requirement.
If the pattern & Entereted content matches, then it will display all possible values that can accept.
这篇关于在电子邮件发送中验证CC,Bcc的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!