Files
django-dav-events/dav_base/validators.py
Jens Kleineheismann d7e2acff34 Replaced ugettext and ugettext_lazy with gettext and gettext_lazy
ugettext and ugettext_lazy were deprecated in Django 3 and will be
removed in Django 4.
2025-04-10 11:33:06 +02:00

14 lines
568 B
Python

# -*- coding: utf-8 -*-
from django.core.validators import RegexValidator
from django.utils.translation import gettext_lazy as _
DAVNumberValidator = RegexValidator(r'^'
r'([0-9]{1,10}/[0-9]{2,10}/)?'
r'[0-9]{1,10}'
r'(\*[0-9]{1,10})?'
r'(\*[0-9]{4}\*[0-9]{4})?'
r'([* ][0-9]{8})?'
r'$',
_('Ungültiges Format.'))