Validator: Add some syntax sugar
All checks were successful
Test / Run tests (push) Successful in 2m51s

This commit is contained in:
2024-08-22 11:04:24 +02:00
parent 85931e62e8
commit ada5085cae

View File

@ -8,7 +8,7 @@ namespace Elwig.Helpers {
public static class Validator {
private static readonly Dictionary<string, string[][]> 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<string[]>() },
{ "48", Array.Empty<string[]>() },
{ "420", Array.Empty<string[]>() },
{ "421", Array.Empty<string[]>() },
{ "36", Array.Empty<string[]>() },
{ "386", Array.Empty<string[]>() },
{ "39", Array.Empty<string[]>() },
{ "33", Array.Empty<string[]>() },
{ "41", Array.Empty<string[]>() },
{ "423", Array.Empty<string[]>() },
] },
{ "49", [] },
{ "48", [] },
{ "420", [] },
{ "421", [] },
{ "36", [] },
{ "386", [] },
{ "39", [] },
{ "33", [] },
{ "41", [] },
{ "423", [] },
};
public static ValidationResult CheckInteger(TextBox input, bool required) {