con2 / kompassi

Kompassi Event Management System
https://kompassi.eu
Other
26 stars 27 forks source link

Add pattern validation to slug fields in dimension editor #401

Open japsu opened 9 months ago

japsu commented 9 months ago

Currently this is the validator used in backend:

https://github.com/con2/kompassi/blob/69c3418ab4da651f6eab9c2890c60076b29f7623/backend/core/utils/model_utils.py#L9-L12

However, this is not validated on the forms, causing a GraphQL error and #399.

Add a similar pattern validator in the frontend to the inputs that convey slugs.