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; }