mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-16 04:02:52 -06:00
9 lines
239 B
Python
9 lines
239 B
Python
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',
|
|
code='invalid'
|
|
)
|