Validator: Add some syntax sugar
All checks were successful
Test / Run tests (push) Successful in 2m51s
All checks were successful
Test / Run tests (push) Successful in 2m51s
This commit is contained in:
@ -8,7 +8,7 @@ namespace Elwig.Helpers {
|
|||||||
public static class Validator {
|
public static class Validator {
|
||||||
|
|
||||||
private static readonly Dictionary<string, string[][]> PHONE_NRS = new() {
|
private static readonly Dictionary<string, string[][]> PHONE_NRS = new() {
|
||||||
{ "43", new string[][] {
|
{ "43", [
|
||||||
[],
|
[],
|
||||||
["57", "59"],
|
["57", "59"],
|
||||||
[
|
[
|
||||||
@ -17,17 +17,17 @@ namespace Elwig.Helpers {
|
|||||||
"650", "651", "652", "653", "655", "657", "659", "660", "661",
|
"650", "651", "652", "653", "655", "657", "659", "660", "661",
|
||||||
"663", "664", "665", "666", "667", "668", "669", "67", "68", "69"
|
"663", "664", "665", "666", "667", "668", "669", "67", "68", "69"
|
||||||
]
|
]
|
||||||
} },
|
] },
|
||||||
{ "49", Array.Empty<string[]>() },
|
{ "49", [] },
|
||||||
{ "48", Array.Empty<string[]>() },
|
{ "48", [] },
|
||||||
{ "420", Array.Empty<string[]>() },
|
{ "420", [] },
|
||||||
{ "421", Array.Empty<string[]>() },
|
{ "421", [] },
|
||||||
{ "36", Array.Empty<string[]>() },
|
{ "36", [] },
|
||||||
{ "386", Array.Empty<string[]>() },
|
{ "386", [] },
|
||||||
{ "39", Array.Empty<string[]>() },
|
{ "39", [] },
|
||||||
{ "33", Array.Empty<string[]>() },
|
{ "33", [] },
|
||||||
{ "41", Array.Empty<string[]>() },
|
{ "41", [] },
|
||||||
{ "423", Array.Empty<string[]>() },
|
{ "423", [] },
|
||||||
};
|
};
|
||||||
|
|
||||||
public static ValidationResult CheckInteger(TextBox input, bool required) {
|
public static ValidationResult CheckInteger(TextBox input, bool required) {
|
||||||
|
Reference in New Issue
Block a user