mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-17 04:32:51 -06:00
Update validators.py
Updated DNSValidator regex
This commit is contained in:
parent
f45e64c756
commit
e0344e9251
@ -24,7 +24,7 @@ class MinPrefixLengthValidator(BaseValidator):
|
|||||||
|
|
||||||
|
|
||||||
DNSValidator = RegexValidator(
|
DNSValidator = RegexValidator(
|
||||||
regex='^[0-9A-Za-z*._-]+$',
|
regex=r'^([0-9A-Za-z_-]+|\*)(\.[0-9A-Za-z_-]+)*\.?$',
|
||||||
message='Only alphanumeric characters, asterisks, hyphens, periods, and underscores are allowed in DNS names',
|
message='Only alphanumeric characters, asterisks, hyphens, periods, and underscores are allowed in DNS names',
|
||||||
code='invalid'
|
code='invalid'
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user