Email Validation

Nadeemshaik
Posted by Nadeemshaik under C# category on | Points: 40 | Views : 827
 public bool EMailValidation(string _Email)
{

BoolleanValues = true;
int IndexofFDot;
int IndexofLDot;
int IndexofRate;
IndexofFDot = _Email.IndexOf(".");
IndexofLDot = _Email.LastIndexOf(".");
IndexofRate = _Email.IndexOf("@");
if (!((IndexofRate < IndexofLDot)
&& (IndexofRate > 0)))
{
BoolleanValues = false;
}
if ((System.Text.RegularExpressions.Regex.IsMatch(_Email, "[^a-zA-Z_0-9.@]-") == true))
{
BoolleanValues = false;
}
return BoolleanValues;
}

Comments or Responses

Login to post response