diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-02-24 15:21:11 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-02-24 15:21:11 -0500 |
| commit | cd6b7f3bdc5bcbc6c68131cc40b71b68ac1b73a6 (patch) | |
| tree | 48b8f6d94e3f762a486aa1c4fa6937cf23c18dee /Emby.Server.Implementations/Connect/Validator.cs | |
| parent | c07e774ca9c0f234ec6899e17fc70301d1990290 (diff) | |
| parent | 66a844e6399f1d79be8e10ea098ba6768e0d123b (diff) | |
Merge pull request #2489 from MediaBrowser/beta
Beta
Diffstat (limited to 'Emby.Server.Implementations/Connect/Validator.cs')
| -rw-r--r-- | Emby.Server.Implementations/Connect/Validator.cs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/Emby.Server.Implementations/Connect/Validator.cs b/Emby.Server.Implementations/Connect/Validator.cs deleted file mode 100644 index 5c94fa71c..000000000 --- a/Emby.Server.Implementations/Connect/Validator.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Text.RegularExpressions; - -namespace Emby.Server.Implementations.Connect -{ - public static class Validator - { - static readonly Regex ValidEmailRegex = CreateValidEmailRegex(); - - /// <summary> - /// Taken from http://haacked.com/archive/2007/08/21/i-knew-how-to-validate-an-email-address-until-i.aspx - /// </summary> - /// <returns></returns> - private static Regex CreateValidEmailRegex() - { - const string validEmailPattern = @"^(?!\.)(""([^""\r\\]|\\[""\r\\])*""|" - + @"([-a-z0-9!#$%&'*+/=?^_`{|}~]|(?<!\.)\.)*)(?<!\.)" - + @"@[a-z0-9][\w\.-]*[a-z0-9]\.[a-z][a-z\.]*[a-z]$"; - - return new Regex(validEmailPattern, RegexOptions.IgnoreCase); - } - - internal static bool EmailIsValid(string emailAddress) - { - bool isValid = ValidEmailRegex.IsMatch(emailAddress); - - return isValid; - } - } -} |
