mirror of
https://github.com/lucaspalomodevelop/netbox-acls.git
synced 2026-03-12 23:27:23 +00:00
fix alphanumeric_plus RegexValidator
This commit is contained in:
parent
9d9b8a51d0
commit
b11fe40d02
25
netbox_acls/migrations/0004_netbox_acls.py
Normal file
25
netbox_acls/migrations/0004_netbox_acls.py
Normal 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."
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
]
|
||||
@ -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.",
|
||||
)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user