Email Validation inside webservice.

M

Mathias Wührmann

Hi Srini,
Im getting user information in webservice and storing in DB. In the
email address field, i do want to validate the email address.
like (e-mail address removed) is give properly r not. (@ .) these things i wanna
check inside the webservice.

check <http://www.regular-expressions.info/email.html> for general
information how to correctly validate an email address regarding a
correct format.

Also, check this article about E-Mail address validation:
http://www.codeproject.com/useritems/E-Mail_address_validation.asp

Regards,

Mathias Wuehrmann
 
S

Srini

Hi all,
Im getting user information in webservice and storing in DB. In the
email address field, i do want to validate the email address.

like (e-mail address removed) is give properly r not. (@ .) these things i wanna
check inside the webservice.

Please help me.

Any help vud be appreciatable.

Thanks & Regards,
Srinivasan.K
 
S

Srini

Hi all,
i found the solution for this.

we can use like this:

public bool IsValidEmail(string strIn)
{
// Return true if strIn is in valid e-mail format.
return Regex.IsMatch(strIn,
@"^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$");
}

and we need to add the name space : system.text.regularexpressions;

this function will return wheather the given email address is valid or not.
Thanks to all.


Thanks & Regards,
Srinivasan.K
 
S

Srini

Thanks Mathias Wührmann.

I got the solution.

--


Thanks & Regards,
Srinivasan.K
Mobile : +91-9840100320
E-Mail : (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top