in FirebaseAdmin/FirebaseAdmin/Auth/UserRecordArgs.cs [126:145]
internal static string CheckEmail(string email, bool required = false)
{
if (email == null)
{
if (required)
{
throw new ArgumentNullException(nameof(email));
}
}
else if (email == string.Empty)
{
throw new ArgumentException("Email must not be empty");
}
else if (!Regex.IsMatch(email, @"^[^@]+@[^@]+$"))
{
throw new ArgumentException($"Invalid email address: {email}");
}
return email;
}