Sfoglia il codice sorgente

Merge pull request #8945 from fmlshai/develop

Fix #8785 - allow wildcard dns records
Jeremy Stretch 3 anni fa
parent
commit
0b44a595e2
1 ha cambiato i file con 2 aggiunte e 2 eliminazioni
  1. 2 2
      netbox/ipam/validators.py

+ 2 - 2
netbox/ipam/validators.py

@@ -24,7 +24,7 @@ class MinPrefixLengthValidator(BaseValidator):
 
 
 
 
 DNSValidator = RegexValidator(
 DNSValidator = RegexValidator(
-    regex='^[0-9A-Za-z._-]+$',
-    message='Only alphanumeric characters, hyphens, periods, and underscores are allowed in DNS names',
+    regex=r'^([0-9A-Za-z_-]+|\*)(\.[0-9A-Za-z_-]+)*\.?$',
+    message='Only alphanumeric characters, asterisks, hyphens, periods, and underscores are allowed in DNS names',
     code='invalid'
     code='invalid'
 )
 )