1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00

9 lines
239 B
Python
Raw Normal View History

2019-04-22 18:10:28 -04:00
from django.core.validators import RegexValidator
DNSValidator = RegexValidator(
regex='^[0-9A-Za-z._-]+$',
message='Only alphanumeric characters, hyphens, periods, and underscores are allowed in DNS names',
2019-04-22 18:10:28 -04:00
code='invalid'
)