fix: youtube video is OPTIONAL (#24)

This commit is contained in:
trafficlunar 2026-04-08 23:03:08 +01:00
parent ab4b42c5b4
commit 7913ccf34d
2 changed files with 2 additions and 0 deletions

View file

@ -35,6 +35,7 @@ const editSchema = z.object({
youtubeId: z
.string()
.regex(/^[a-zA-Z0-9_-]{11}$/, "Invalid YouTube video ID")
.or(z.literal(""))
.optional(),
instructions: switchMiiInstructionsSchema,
image1: z.union([z.instanceof(File), z.any()]).optional(),

View file

@ -40,6 +40,7 @@ const submitSchema = z
youtubeId: z
.string()
.regex(/^[a-zA-Z0-9_-]{11}$/, "Invalid YouTube video ID")
.or(z.literal(""))
.optional(),
instructions: switchMiiInstructionsSchema,