diff --git a/README.md b/README.md index df37937..01256d1 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ The solution consists of 4 libraries - a base one and 3 platform specific ones: * FirebaseAuthentication.net targets [.NET Standard 2.0](https://github.com/dotnet/standard/blob/master/docs/versions.md) * FirebaseAuthentication.WPF targets [WPF on .NET 6](https://github.com/dotnet/wpf) * FirebaseAuthentication.UWP targets [UWP with min version 19041](https://docs.microsoft.com/en-us/windows/uwp/updates-and-versions/choose-a-uwp-version) -* FirebaseAuthentication.Xamarin targets Xamarin.Forms (*TODO*) +* FirebaseAuthentication.Maui targets Maui (*TODO*) ## Installation @@ -25,7 +25,7 @@ dotnet add package FirebaseAuthentication.net # Platform specific FirebaseUI (has dependency on base package) dotnet add package FirebaseAuthentication.WPF dotnet add package FirebaseAuthentication.UWP -dotnet add package FirebaseAuthentication.Xamarin +dotnet add package FirebaseAuthentication.Maui ``` Use the `--version` option to specify a [preview version](https://www.nuget.org/packages/FirebaseAuthentication.net/absoluteLatest) to install. diff --git a/src/Auth.UI/EmailValidator.cs b/src/Auth.UI/EmailValidator.cs index fa1fd9e..7749335 100644 --- a/src/Auth.UI/EmailValidator.cs +++ b/src/Auth.UI/EmailValidator.cs @@ -1,4 +1,5 @@ -using System.Text.RegularExpressions; +using System; +using System.Net.Mail; namespace Firebase.Auth.UI { @@ -9,9 +10,16 @@ public static class EmailValidator /// public static bool ValidateEmail(string email) { - var regx = new Regex(@"^([\w\.\-]+)@([\w\-]+)((\.(\w){2,3})+)$"); - var match = regx.Match(email); - return match.Success; + try + { + var m = new MailAddress(email); + + return true; + } + catch (FormatException) + { + return false; + } } } } diff --git a/src/Auth/Auth.csproj b/src/Auth/Auth.csproj index d4af3dd..c557395 100644 --- a/src/Auth/Auth.csproj +++ b/src/Auth/Auth.csproj @@ -14,7 +14,7 @@ FirebaseUI is supported by platform-specific libraries: * FirebaseAuthentication.WPF * FirebaseAuthentication.UWP -* FirebaseAuthentication.Xamarin +* FirebaseAuthentication.Maui README.md false