locationAction: fixed optional form fields
This commit is contained in:
@@ -27,8 +27,8 @@ const FormSchema = (t:IntlTemplateFn) => z.object({
|
||||
_id: z.string(),
|
||||
locationName: z.coerce.string().min(1, t("location-name-required")),
|
||||
locationNotes: z.string(),
|
||||
addToSubsequentMonths: z.boolean().optional(),
|
||||
updateScope: z.enum(["current", "subsequent", "all"]).optional(),
|
||||
addToSubsequentMonths: z.boolean().optional().nullable(),
|
||||
updateScope: z.enum(["current", "subsequent", "all"]).optional().nullable(),
|
||||
})
|
||||
// dont include the _id field in the response
|
||||
.omit({ _id: true });
|
||||
|
||||
Reference in New Issue
Block a user