diff --git a/src/IbanNet/Registry/Patterns/AsciiCategory.cs b/src/IbanNet/Registry/Patterns/AsciiCategory.cs index 4e4d64e1..719a5186 100644 --- a/src/IbanNet/Registry/Patterns/AsciiCategory.cs +++ b/src/IbanNet/Registry/Patterns/AsciiCategory.cs @@ -15,6 +15,15 @@ public enum AsciiCategory /// None = 0, + /// + /// No ASCII category. + /// + [Obsolete("Use None instead.", true)] +#pragma warning disable CA1069 + // ReSharper disable once UnusedMember.Global + Other = 0, +#pragma warning restore CA1069 + /// /// The space character. /// diff --git a/src/IbanNet/Registry/Patterns/PatternToken.cs b/src/IbanNet/Registry/Patterns/PatternToken.cs index 20700b1c..ed7e5f1f 100644 --- a/src/IbanNet/Registry/Patterns/PatternToken.cs +++ b/src/IbanNet/Registry/Patterns/PatternToken.cs @@ -121,9 +121,10 @@ private PatternToken(AsciiCategory category, int minLength, int maxLength, strin /// public override string ToString() { + string category = Enum.GetName(typeof(AsciiCategory), Category)!; return IsFixedLength - ? $"{Category}[{MaxLength}]" - : $"{Category}[{MinLength}-{MaxLength}]"; + ? $"{category}[{MaxLength}]" + : $"{category}[{MinLength}-{MaxLength}]"; } private static Func GetCharacterTest(AsciiCategory category)