netbox-acls icon indicating copy to clipboard operation
netbox-acls copied to clipboard

[Housekeeping]: Validate `AccessList.name` with `validate_slug` (replace custom regex)

Open pheus opened this issue 2 months ago • 0 comments

Proposed Changes

  • Keep AccessList.name as a CharField.
  • Add Django’s validate_slug validator to the field (no field-type change).
  • Update tests accordingly.

Justification

Replace the custom RegexValidator for AccessList.name with Django’s built-in validate_slug to reduce custom code and resolve the test suite’s invalid escape sequence warning.

  • Remove bespoke validation logic in favor of a built-in validator.
  • Keep behavior explicit and maintainable.

References

  • Related PR: #270

pheus avatar Sep 26 '25 19:09 pheus