2014年7月13日 星期日

[RESOLVED] How accept email format in asp.net?


Accept valid email format in asp.net


I am using following code



But this one 


I am enter data Anil@gmail.hhh this one also Accepting,It can accept only
Anil@gmail.com format



Hello Anil,


Try below regex expression, assuming you want only gmail account validation


^\w+([-+.']\w+)*@(?:GMAIL|gmail).com



i want all address



Let me tell you one thing, no matter what you do , end user can send invalid email ID.You can go through below reference for types of regex expressions , but then again , some loophole will be there:


http://regexlib.com/Search.aspx?k=email&AspxAutoDetectCookieSupport=1




Hi,




ANILBABU


i want all address


I agree with Asim there are thousands of domain and sub-domain now. Not possible to validate each and everyone of them.


Regards!


沒有留言:

張貼留言