We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6bf50d commit d051d78Copy full SHA for d051d78
1 file changed
src/content.config.ts
@@ -10,7 +10,10 @@ const videos = defineCollection({
10
description: z.string(),
11
url: z.string().url(),
12
thumbnail: z.string().optional(),
13
- platform: z.enum(['youtube', 'vimeo']),
+ platform: z.preprocess(
14
+ (val) => (typeof val === 'string' ? val.trim().toLowerCase() : val),
15
+ z.string()
16
+ ),
17
duration: z.string().optional(),
18
publishedDate: z.coerce.date().optional(),
19
})
0 commit comments