mirror of
https://github.com/pocket-id/pocket-id.git
synced 2026-03-23 20:00:06 +00:00
feat: allow custom client IDs (#864)
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
import z from 'zod/v4';
|
||||
|
||||
export const optionalString = z
|
||||
.string()
|
||||
.transform((v) => (v === '' ? undefined : v))
|
||||
.optional();
|
||||
export const emptyToUndefined = <T>(validation: z.ZodType<T>) =>
|
||||
z.preprocess((v) => (v === '' ? undefined : v), validation);
|
||||
|
||||
export const optionalUrl = z
|
||||
.url()
|
||||
|
||||
Reference in New Issue
Block a user