11 lines
712 B
Python
11 lines
712 B
Python
from django.core.validators import RegexValidator
|
|
|
|
|
|
AlphanumericValidator = RegexValidator(r'^[0-9a-zA-Z]*$', 'Only latin characters (A-Z, a-z)'
|
|
' and digits (0-9) are allowed.')
|
|
LowerAlphanumericValidator = RegexValidator(r'^[0-9a-z]*$', 'Only lower case latin characters (a-z)'
|
|
' and digits (0-9) are allowed.')
|
|
IdStringValidator = RegexValidator(r'^[0-9a-z_.-]*$', 'Only lower case latin characters (a-z),'
|
|
' digits (0-9),'
|
|
' dots (.), underscores (_) and hyphens (-) are allowed.')
|