diff options
Diffstat (limited to 'src/IOL.Helpers/Validators.cs')
| -rw-r--r-- | src/IOL.Helpers/Validators.cs | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/IOL.Helpers/Validators.cs b/src/IOL.Helpers/Validators.cs index d60afcf..a6937d6 100644 --- a/src/IOL.Helpers/Validators.cs +++ b/src/IOL.Helpers/Validators.cs @@ -1,18 +1,17 @@ using System.Net.Mail; using System.Text.RegularExpressions; -namespace IOL.Helpers +namespace IOL.Helpers; + +public static class Validators { - public static class Validators - { - private static readonly Regex _norwegianPhoneNumber = new(@"^(0047|\+47|47)?[2-9]\d{7}$"); + private static readonly Regex _norwegianPhoneNumber = new(@"^(0047|\+47|47)?[2-9]\d{7}$"); - public static bool IsValidEmailAddress(this string value) { - return MailAddress.TryCreate(value, out _); - } + public static bool IsValidEmailAddress(this string value) { + return MailAddress.TryCreate(value, out _); + } - public static bool IsValidNorwegianPhoneNumber(this string value) { - return _norwegianPhoneNumber.IsMatch(value); - } + public static bool IsValidNorwegianPhoneNumber(this string value) { + return _norwegianPhoneNumber.IsMatch(value); } -}
\ No newline at end of file +} |
