Skip to content

Commit

Permalink
#3722: Tweak ordering of permitted characters to avoid creating a reg…
Browse files Browse the repository at this point in the history
…ex range
  • Loading branch information
jeremystretch committed Dec 9, 2019
1 parent f2076c9 commit 95edec5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion netbox/ipam/migrations/0027_ipaddress_add_dns_name.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ class Migration(migrations.Migration):
migrations.AddField(
model_name='ipaddress',
name='dns_name',
field=models.CharField(blank=True, max_length=255, validators=[django.core.validators.RegexValidator(code='invalid', message='Only alphanumeric characters, hyphens, periods, and underscores are allowed in DNS names', regex='^[0-9A-Za-z.-_]+$')]),
field=models.CharField(blank=True, max_length=255, validators=[django.core.validators.RegexValidator(code='invalid', message='Only alphanumeric characters, hyphens, periods, and underscores are allowed in DNS names', regex='^[0-9A-Za-z._-]+$')]),
),
]
2 changes: 1 addition & 1 deletion netbox/ipam/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@


DNSValidator = RegexValidator(
regex='^[0-9A-Za-z.-_]+$',
regex='^[0-9A-Za-z._-]+$',
message='Only alphanumeric characters, hyphens, periods, and underscores are allowed in DNS names',
code='invalid'
)

0 comments on commit 95edec5

Please sign in to comment.