fix: use new zod 4 error property
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
|
||||
const schema = z.object({
|
||||
input: z.string({
|
||||
required_error: "Input is required"
|
||||
error: "Input is required"
|
||||
}).nonempty()
|
||||
});
|
||||
|
||||
|
@@ -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()
|
||||
});
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
|
||||
const schema = z.object({
|
||||
notificationTitle: z.string({
|
||||
required_error: "Title is required"
|
||||
error: "Title is required"
|
||||
}).nonempty(),
|
||||
notificationBody: z.string().optional()
|
||||
});
|
||||
|
@@ -33,7 +33,7 @@
|
||||
|
||||
const schema = z.object({
|
||||
value: z.string({
|
||||
required_error: "Store key is required"
|
||||
error: "Store key is required"
|
||||
}).nonempty()
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user