From 7ff7f3902e5bdcc33bfc07fa6ad71a5798d7f8d6 Mon Sep 17 00:00:00 2001 From: ivarlovlie Date: Sat, 20 Nov 2021 21:31:30 +0100 Subject: Change to file-scoped namespaces. Add ConditionalWhere to QueryableHelpers.cs --- src/IOL.Helpers/Validators.cs | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'src/IOL.Helpers/Validators.cs') 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 +} -- cgit v1.3