Fixes #3722: Allow the underscore character in IPAddress DNS names

This commit is contained in:
Jeremy Stretch
2019-12-05 21:14:29 -05:00
parent da48e0be96
commit c530f970b1
2 changed files with 3 additions and 2 deletions

View File

@@ -2,7 +2,7 @@ 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',
regex='^[0-9A-Za-z.-_]+$',
message='Only alphanumeric characters, hyphens, periods, and underscores are allowed in DNS names',
code='invalid'
)