Fix regex for IPAddress.dns_name (but see #3106)

This commit is contained in:
Jeremy Stretch
2019-04-25 14:49:52 -04:00
parent 595a7fe950
commit f8447989f2
3 changed files with 16 additions and 7 deletions

View File

@@ -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, and periods 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, and periods are allowed in DNS names', regex='^[0-9A-Za-z.-]+$')]),
),
]