Support of prefixed cuid2 out of the box #3768
ChristianIvicevic
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm working with prefixed cuid2 values such as
thing_z716hlc2rzi1sao2x7oez0yo
and naturallyz.string().cuid2()
doesn't match this pattern. As such I'm currently falling back toz.string().refine((value) => value.startsWith('thing') && isCuid(value.replace('thing_', '')))
. Have there been discussions to introduce an overload of.cuid2()
that supports matching such a prefix out of the box?Beta Was this translation helpful? Give feedback.
All reactions