netbox-acls
netbox-acls copied to clipboard
[Housekeeping]: Validate `AccessList.name` with `validate_slug` (replace custom regex)
Proposed Changes
- Keep
AccessList.nameas aCharField. - Add Django’s
validate_slugvalidator 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