fix alphanumeric_plus RegexValidator

This commit is contained in:
ryanmerolle 2023-06-23 21:04:39 +00:00
parent 9d9b8a51d0
commit b11fe40d02
2 changed files with 26 additions and 1 deletions

View File

@ -0,0 +1,25 @@
# Generated by Django 4.1.9 on 2023-06-23 21:02
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("netbox_acls", "0003_netbox_acls"),
]
operations = [
migrations.AlterField(
model_name="accesslist",
name="name",
field=models.CharField(
max_length=500,
validators=[
django.core.validators.RegexValidator(
"^[a-zA-Z0-9-_]+$", "Only alphanumeric, hyphens, and underscores characters are allowed."
)
],
),
),
]

View File

@ -21,7 +21,7 @@ __all__ = (
alphanumeric_plus = RegexValidator(
r"^[0-9a-zA-Z,-,_]*$",
r"^[a-zA-Z0-9-_]+$",
"Only alphanumeric, hyphens, and underscores characters are allowed.",
)