mirror of
https://github.com/netbox-community/netbox.git
synced 2026-02-20 07:47:54 +01:00
9 lines
225 B
Python
9 lines
225 B
Python
from django.core.validators import RegexValidator
|
|
|
|
|
|
DNSValidator = RegexValidator(
|
|
regex='^[0-9A-Za-z.-]+$',
|
|
message='Only alphanumeric characters, hyphens, and periods are allowed in DNS names',
|
|
code='invalid'
|
|
)
|