diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-04 14:56:47 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-11-04 14:56:47 -0400 |
| commit | 72aaecb27930e04aa356febf35db2372bc417166 (patch) | |
| tree | c72bb0ed40bd257b93d4b11f315bbbe24e23920d /MediaBrowser.Server.Implementations/Connect/Validator.cs | |
| parent | a7b11c8ee952ca43fe949ab4f1b6577e94ce6bba (diff) | |
move classes to new server project
Diffstat (limited to 'MediaBrowser.Server.Implementations/Connect/Validator.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Connect/Validator.cs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/MediaBrowser.Server.Implementations/Connect/Validator.cs b/MediaBrowser.Server.Implementations/Connect/Validator.cs deleted file mode 100644 index 8cdfc4a6b..000000000 --- a/MediaBrowser.Server.Implementations/Connect/Validator.cs +++ /dev/null @@ -1,29 +0,0 @@ -using System.Text.RegularExpressions; - -namespace MediaBrowser.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; - } - } -} |
