1. export type ActionResponse<T = void, U = Record<string, unknown>> = {
    	success: boolean;
    	message?: string;
    	data?: T;
    	zodErrors?: typeToFlattenedError<U>["fieldErrors"];
    };
  2. const editPageContentSchema = z.object({
    	slug: z.string().min(1),
    	title: z.string().min(1).max(100),
    	pageContent: z.string().min(1),
    });
    	
    const parsedFormData = editPageContentSchema.safeParse({
    		slug: formData.get("slug"),
    		title: formData.get("title"),
    		pageContent: formData.get("pageContent"),
    	});



798
1

Comments

t
tomoki2025. 3. 25. 오전 12:10:00

deleted