diff --git a/Elwig/Helpers/Validator.cs b/Elwig/Helpers/Validator.cs index e40f9cd..aa99de6 100644 --- a/Elwig/Helpers/Validator.cs +++ b/Elwig/Helpers/Validator.cs @@ -70,9 +70,9 @@ namespace Elwig.Helpers { for (int i = 0; i < input.Text.Length; i++) { char ch = input.Text[i]; if (char.IsAsciiDigit(ch)) { - if (v2 == -1 && v1 < maxLen) { + if (v2 == -1 && (maxLen == -1 || v1 < maxLen)) { text += ch; v1++; - } else if (v2 != -1 && v2 < maxDecimal) { + } else if (v2 != -1 && (maxDecimal == -1 || v2 < maxDecimal)) { text += ch; v2++; } } else if (v2 == 0-1 && ch == ',' || ch == '.') {