Open McPizza0 opened 4 days ago
hmm... for these ones, I would err on the side of caution by increasing the max to 64 - just in case we have users with slugs greater than 32 in their scripts
hmm... for these ones, I would err on the side of caution by increasing the max to 64 - just in case we have users with slugs greater than 32 in their scripts
Yup this one is hard, I added max 64 for now
Description 📣
This PR adds a universal
slug
validation function that takes 3 inputs (min
,max
,field
) and will use zod validation combined withslugify
to validate inputs. Errors are descriptive and dynamic based on inputs.slugSchema
exists in BOTH frontend and backend, and should be moved to unified utils package when repo moves to monorepo.All slug related frontend form inputs and api params we're updated to use the new
slugSchema
Type ✨
Tests 🛠️
Manually tested on frontend
Backend testing blocked: ISSUE WITH API RESPONSE