We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ec6e68b + 122f9e9 commit 6636a44Copy full SHA for 6636a44
server/StrDss.Common/CommonUtils.cs
@@ -81,11 +81,13 @@ public static string SanitizeAndUppercaseString(string input)
81
82
public static bool IsValidEmailAddress(string email)
83
{
84
+ if (string.IsNullOrWhiteSpace(email)) return false;
85
+
86
var valid = Regex.IsMatch(email, RegexDefs.GetRegexInfo(RegexDefs.Email).Regex);
87
88
if (!valid) return false;
89
- if (email.StartsWith(".") || email.Contains(".@")) return false;
90
+ if (email.StartsWith(".") || email.EndsWith(".") || email.Contains(".@") || email.Contains("@.")) return false;
91
92
return true;
93
}
0 commit comments