diff --git a/scipost_django/common/converters.py b/scipost_django/common/converters.py index 5dddfd086ab6e44f353608b8efb7b2510a34ea1a..296286fc42967c8e8d2d8d31668fd48218fc9d68 100644 --- a/scipost_django/common/converters.py +++ b/scipost_django/common/converters.py @@ -20,7 +20,7 @@ class FourDigitYearConverter: class TwoDigitMonthConverter: - regex = '(0[1-9]{1})|(1[1-2]{1})' + regex = '0[1-9]|1[0-2]' def to_python(self, value): return int(value) @@ -30,7 +30,7 @@ class TwoDigitMonthConverter: class TwoDigitDayConverter: - regex = '([0-2]{1}[1-9])|30|31' + regex = '0[1-9]|[1-2][0-9]|3[0-1]' def to_python(self, value): return int(value)