From ada5085cae559c915e56968b95d9932332f064e0 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Thu, 22 Aug 2024 11:04:24 +0200 Subject: [PATCH] Validator: Add some syntax sugar --- Elwig/Helpers/Validator.cs | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Elwig/Helpers/Validator.cs b/Elwig/Helpers/Validator.cs index be5904d..53b50b3 100644 --- a/Elwig/Helpers/Validator.cs +++ b/Elwig/Helpers/Validator.cs @@ -8,7 +8,7 @@ namespace Elwig.Helpers { public static class Validator { private static readonly Dictionary PHONE_NRS = new() { - { "43", new string[][] { + { "43", [ [], ["57", "59"], [ @@ -17,17 +17,17 @@ namespace Elwig.Helpers { "650", "651", "652", "653", "655", "657", "659", "660", "661", "663", "664", "665", "666", "667", "668", "669", "67", "68", "69" ] - } }, - { "49", Array.Empty() }, - { "48", Array.Empty() }, - { "420", Array.Empty() }, - { "421", Array.Empty() }, - { "36", Array.Empty() }, - { "386", Array.Empty() }, - { "39", Array.Empty() }, - { "33", Array.Empty() }, - { "41", Array.Empty() }, - { "423", Array.Empty() }, + ] }, + { "49", [] }, + { "48", [] }, + { "420", [] }, + { "421", [] }, + { "36", [] }, + { "386", [] }, + { "39", [] }, + { "33", [] }, + { "41", [] }, + { "423", [] }, }; public static ValidationResult CheckInteger(TextBox input, bool required) {