fix: enhance resume schema validation and improve slugify function for CJK input

This commit is contained in:
Amruth Pillai
2026-05-11 00:27:47 +02:00
parent 0abee1048c
commit 4ebe9e5a67
3 changed files with 10 additions and 4 deletions
+3 -3
View File
@@ -6,12 +6,12 @@ import { jsonPatchOperationSchema } from "@reactive-resume/utils/resume/patch";
const resumeSchema = createSelectSchema(schema.resume, {
id: z.string().describe("The ID of the resume."),
name: z.string().min(1).describe("The name of the resume."),
slug: z.string().min(1).describe("The slug of the resume."),
name: z.string().trim().min(1).describe("The name of the resume."),
slug: z.string().trim().min(1).describe("The slug of the resume."),
tags: z.array(z.string()).describe("The tags of the resume."),
isPublic: z.boolean().describe("Whether the resume is public."),
isLocked: z.boolean().describe("Whether the resume is locked."),
password: z.string().min(6).nullable().describe("The password of the resume, if any."),
password: z.string().trim().min(6).max(64).nullable().describe("The password of the resume, if any."),
data: resumeDataSchema,
userId: z.string().describe("The ID of the user who owns the resume."),
createdAt: z.date().describe("The date and time the resume was created."),