diff --git a/src/components/features/dashboard/admin/problemset/new/schema.ts b/src/components/features/dashboard/admin/problemset/new/schema.ts new file mode 100644 index 0000000..764218c --- /dev/null +++ b/src/components/features/dashboard/admin/problemset/new/schema.ts @@ -0,0 +1,11 @@ +import { z } from "zod"; +import { ProblemSchema } from "@/generated/zod"; + +export const problemSchema = ProblemSchema.extend({ + displayId: z.coerce.number().int().positive().min(1), + title: z.string().min(1), + description: z.string().min(1), + solution: z.string().min(1), +}); + +export type ProblemSchema = z.infer;