keystatic
keystatic copied to clipboard
Slug field: execute `generate` on every save to ensure valid slugs
Hi
It's nice that we can give the user control over slugs, that makes sense in some places. But it would be very helpful if generate is not only executed on "Regenerate"-Click but also on every save.
I had assumed that this would happen, but unfortunately the CMS user can "break" the slug with spaces, non-alphanumeric characters etc.
Hi !
I had the same issue with a CMS user who broke his home page for this reason (whitespace and comma in a slug).
Maybe a validation property on fields.slug to reject slugs containing whitespaces or special chars could do the trick ?