diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2024-11-17 12:38:16 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2024-11-17 12:39:10 +0100 |
commit | 02186014334be2cd2d8899835b8380ba1af74b7b (patch) | |
tree | dadb95a2234586c05291925e1632289343585b9a | |
parent | bcd5018ee6842a13b07b168c6bc01c5d28c87406 (diff) |
-rw-r--r-- | stdnum/uy/rut.py | 2 | ||||
-rw-r--r-- | tests/test_uy_rut.doctest | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/stdnum/uy/rut.py b/stdnum/uy/rut.py index baf6322..769578d 100644 --- a/stdnum/uy/rut.py +++ b/stdnum/uy/rut.py @@ -87,7 +87,7 @@ def validate(number): raise InvalidLength() if not isdigits(number): raise InvalidFormat() - if number[:2] < '01' or number[:2] > '21': + if number[:2] < '01' or number[:2] > '22': raise InvalidComponent() if number[2:8] == '000000': raise InvalidComponent() diff --git a/tests/test_uy_rut.doctest b/tests/test_uy_rut.doctest index 0458389..784690e 100644 --- a/tests/test_uy_rut.doctest +++ b/tests/test_uy_rut.doctest @@ -47,7 +47,7 @@ InvalidFormat: ... Traceback (most recent call last): ... InvalidComponent: ... ->>> rut.validate('221599340019') # invalid first two digits +>>> rut.validate('991599340011') # invalid first two digits Traceback (most recent call last): ... InvalidComponent: ... @@ -269,6 +269,7 @@ These have been found online and should all be valid numbers. ... 217132510011 ... 217142440016 ... 217149110011 +... 220018800014 ... ... ''' >>> [x for x in numbers.splitlines() if x and not rut.is_valid(x)] |