private ValidateEmail ( string email, bool requireUnique, int maxLength ) : bool | ||
string | ||
requireUnique | bool | |
maxLength | int | |
return | bool |
private bool ValidateEmail(string email, bool requireUnique, int maxLength)
{
if (string.IsNullOrWhiteSpace(email) && requireUnique)
{
return false;
}
if (string.IsNullOrWhiteSpace(email))
{
return true;
}
if (email.Length > maxLength)
{
return false;
}
if (this.EmailStrengthRegularExpression.Length > 0)
{
if (!Regex.IsMatch(email, this.EmailStrengthRegularExpression))
{
return false;
}
}
return true;
}
BetterMembershipProvider::ValidateEmail ( string email ) : bool |