Modified null and empty string check.
This commit is contained in:
parent
f8d7732025
commit
52cb3cb980
@ -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])@))" +
|
||||
|
Loading…
x
Reference in New Issue
Block a user