fix: use new zod 4 error property

This commit is contained in:
Nicola Spadari
2025-07-12 15:27:06 +02:00
parent abc619b1d2
commit b707c09176
4 changed files with 5 additions and 5 deletions

View File

@@ -29,12 +29,12 @@
const schema = z.object({
fileName: z.string({
required_error: "File name is required"
error: "File name is required"
}).nonempty().regex(/^[\w,\s-]+\.[A-Z0-9]+$/i, {
message: "Invalid filename format"
}),
fileContent: z.string({
required_error: "File content is required"
error: "File content is required"
}).nonempty()
});