Modified null and empty string check.

This commit is contained in:
Aubrey 2020-03-29 09:00:26 -04:00
parent f8d7732025
commit 52cb3cb980

View File

@ -222,10 +222,7 @@ namespace Oqtane.Shared
public static bool IsValidEmail(string email)
{
if (email != "")
{
return true;
}
if (string.IsNullOrEmpty(email)) return false;
return Regex.IsMatch(email,
@"^(?("")("".+?(?<!\\)""@)|(([0-9a-z]((\.(?!\.))|[-!#\$%&'\*\+/=\?\^`\{\}\|~\w])*)(?<=[0-9a-z])@))" +