14 lines
570 B
Python
14 lines
570 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]{3}/[0-9]{2}/)?'
|
|
r'[0-9]{1,6}'
|
|
r'([*x ][0-9]{1,4})?'
|
|
r'([*x ][0-9]{4}[*x ][0-9]{4})?'
|
|
r'([*x ][0-9]{8})?'
|
|
r'$',
|
|
_('Ungültiges Format.'))
|