Torbjørn
Torbjørn
Explore posts from servers
ZZod
Created by Torbjørn on 11/27/2024 in #questions
Torbjørn - Hi!We use zod to validate data com...
Thank you so much! This is exactly what I was looking for!
7 replies
ZZod
Created by Torbjørn on 11/27/2024 in #questions
Torbjørn - Hi!We use zod to validate data com...
Does anyone have any ideas of how we can keep our string enums and still let the stega strings through? I have tried using unions, but they just give us the string type (Not what we want, but its the easiest)
import { z } from 'zod';
import { VERCEL_STEGA_REGEX } from '@vercel/stega';

const MyStringSchema = z.union([z.literal('hello'), z.literal('world'), z.string().regex(VERCEL_STEGA_REGEX)]);

type TestType1 = z.infer<typeof MyStringSchema>; // string 🥲
import { z } from 'zod';
import { VERCEL_STEGA_REGEX } from '@vercel/stega';

const MyStringSchema = z.union([z.literal('hello'), z.literal('world'), z.string().regex(VERCEL_STEGA_REGEX)]);

type TestType1 = z.infer<typeof MyStringSchema>; // string 🥲
7 replies
ZZod
Created by Torbjørn on 11/27/2024 in #questions
Torbjørn - Hi!We use zod to validate data com...
{
"received": "overlay​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌​‌‍​‌‌‍‍‌‍‍‌‌‌​‌‍‌​‍‍‌‍‍‌‌‍​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍​‍‌​‌‌​‌‌‌‌‍‌​‌‍‍‌‌‍​‍‌‍‍‌‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍‌‍‌‌‍‌‍‌​‌‍‌‌​‌‌​​‌​‍‌‍‌‌‌​‌‍‌‌‌‍‍‌‌​‌‍​‌‌‌​‌‍‍‌‌‍‌‍‍​‍‌‍‍‌‌‍‌​​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌‌​‌‍‌‌​​‌‍‌‌​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍‍​‌‍‌‌‌​‍‌‍​‍‍‌​‌‌​‌‍‌‌‍​‌‍‌‌​‌‍​‍‌‍​‌‌​‌‍‌‌‌‌‌‌‌​‍‌‍​​‌​‍‌‌​​‍‌​‌‍‌​‌‌​‌‌‌‌‍‌​‌‍‍‌‌‍​‍‌‍‌‍‍‌‌‍‌​​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌‍‌‌​‌‍‌‌​​‌‍‌‌​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌‍‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍‍​‌‍‌‌‌​‍‌‍​‍‍‌​‌‌​‌‍‌‌‍​‌‍‌‌​‍‌‍‌‍‍‌‌​‌​‌​‌​‍‌‍​‌‌‍‌‍‌‌​​‌​‍​‍‌‌",
"code": "invalid_enum_value",
"options": [
"overlay",
"splitview"
],
"path": [
"hero",
"style"
],
"message": "Invalid enum value. Expected 'overlay' | 'splitview', received 'overlay​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌​‌‍​‌‌‍‍‌‍‍‌‌‌​‌‍‌​‍‍‌‍‍‌‌‍​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍​‍‌​‌‌​‌‌‌‌‍‌​‌‍‍‌‌‍​‍‌‍‍‌‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍‌‍‌‌‍‌‍‌​‌‍‌‌​‌‌​​‌​‍‌‍‌‌‌​‌‍‌‌‌‍‍‌‌​‌‍​‌‌‌​‌‍‍‌‌‍‌‍‍​‍‌‍‍‌‌‍‌​​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌‌​‌‍‌‌​​‌‍‌‌​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍‍​‌‍‌‌‌​‍‌‍​‍‍‌​‌‌​‌‍‌‌‍​‌‍‌‌​‌‍​‍‌‍​‌‌​‌‍‌‌‌‌‌‌‌​‍‌‍​​‌​‍‌‌​​‍‌​‌‍‌​‌‌​‌‌‌‌‍‌​‌‍‍‌‌‍​‍‌‍‌‍‍‌‌‍‌​​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌‍‌‌​‌‍‌‌​​‌‍‌‌​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌‍‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍‍​‌‍‌‌‌​‍‌‍​‍‍‌​‌‌​‌‍‌‌‍​‌‍‌‌​‍‌‍‌‍‍‌‌​‌​‌​‌​‍‌‍​‌‌‍‌‍‌‌​​‌​‍​‍‌‌'"
}
{
"received": "overlay​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌​‌‍​‌‌‍‍‌‍‍‌‌‌​‌‍‌​‍‍‌‍‍‌‌‍​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍​‍‌​‌‌​‌‌‌‌‍‌​‌‍‍‌‌‍​‍‌‍‍‌‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍‌‍‌‌‍‌‍‌​‌‍‌‌​‌‌​​‌​‍‌‍‌‌‌​‌‍‌‌‌‍‍‌‌​‌‍​‌‌‌​‌‍‍‌‌‍‌‍‍​‍‌‍‍‌‌‍‌​​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌‌​‌‍‌‌​​‌‍‌‌​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍‍​‌‍‌‌‌​‍‌‍​‍‍‌​‌‌​‌‍‌‌‍​‌‍‌‌​‌‍​‍‌‍​‌‌​‌‍‌‌‌‌‌‌‌​‍‌‍​​‌​‍‌‌​​‍‌​‌‍‌​‌‌​‌‌‌‌‍‌​‌‍‍‌‌‍​‍‌‍‌‍‍‌‌‍‌​​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌‍‌‌​‌‍‌‌​​‌‍‌‌​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌‍‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍‍​‌‍‌‌‌​‍‌‍​‍‍‌​‌‌​‌‍‌‌‍​‌‍‌‌​‍‌‍‌‍‍‌‌​‌​‌​‌​‍‌‍​‌‌‍‌‍‌‌​​‌​‍​‍‌‌",
"code": "invalid_enum_value",
"options": [
"overlay",
"splitview"
],
"path": [
"hero",
"style"
],
"message": "Invalid enum value. Expected 'overlay' | 'splitview', received 'overlay​​​​‌‍​‍​‍‌‍‌​‍‌‍‍‌‌‍‌‌‍‍‌‌‍‍​‍​‍​‍‍​‍​‍‌​‌‍​‌‌‍‍‌‍‍‌‌‌​‌‍‌​‍‍‌‍‍‌‌‍​‍​‍​‍​​‍​‍‌‍‍​‌​‍‌‍‌‌‌‍‌‍​‍​‍​‍‍​‍​‍​‍‌​‌‌​‌‌‌‌‍‌​‌‍‍‌‌‍​‍‌‍‍‌‌‍‍‌‌​‌‍‌‌‌‍‍‌‌​​‍‌‍‌‌‌‍‌​‌‍‍‌‌‌​​‍‌‍‌‌‍‌‍‌​‌‍‌‌​‌‌​​‌​‍‌‍‌‌‌​‌‍‌‌‌‍‍‌‌​‌‍​‌‌‌​‌‍‍‌‌‍‌‍‍​‍‌‍‍‌‌‍‌​​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌‌​‌‍‌‌​​‌‍‌‌​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍‍​‌‍‌‌‌​‍‌‍​‍‍‌​‌‌​‌‍‌‌‍​‌‍‌‌​‌‍​‍‌‍​‌‌​‌‍‌‌‌‌‌‌‌​‍‌‍​​‌​‍‌‌​​‍‌​‌‍‌​‌‌​‌‌‌‌‍‌​‌‍‍‌‌‍​‍‌‍‌‍‍‌‌‍‌​​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌‍‌‌​‌‍‌‌​​‌‍‌‌​‌‌‍‌‍‌​‍‌‍‌‍‍‌‌​‌​​‌‍​‌‌‍‌‌‍‌‌​‍‌‍‌​​‌‍​‌‌‌​‌‍‍​​‌‌‍‍​‌‍‌‌‌​‍‌‍​‍‍‌​‌‌​‌‍‌‌‍​‌‍‌‌​‍‌‍‌‍‍‌‌​‌​‌​‌​‍‌‍​‌‌‍‌‍‌‌​​‌​‍​‍‌‌'"
}
7 replies
CDCloudflare Developers
Created by Torbjørn on 11/25/2024 in #pages-help
Does image transformations work for Pages apps?
Yeah, I just deployed a worker on my domain, and it worked fine. It should be added to the docs, if its not already there and I missed it.
3 replies