fix: changes to error on schedule name empty save (#24044)
* fix #21709: change to error on schedule name empty save * fix comments * minor enahncemnts --------- Co-authored-by: Volnei Munhoz <[email protected]> Co-authored-by: Anik Dhabal Babu <[email protected]>
This commit is contained in:
4 files changed
+7
-2
No files matched your search
@@ -7,7 +7,7 @@ export type TCreateInputSchema = {
|
||||
};
|
||||
|
||||
export const ZCreateInputSchema: z.ZodType<TCreateInputSchema> = z.object({
|
||||
name: z.string(),
|
||||
name: z.string().trim().min(1, "Schedule name cannot be empty"),
|
||||
schedule: z
|
||||
.array(
|
||||
z.array(
|
||||
|
||||
@@ -5,7 +5,7 @@ import { timeZoneSchema } from "@calcom/lib/dayjs/timeZone.schema";
|
||||
export const ZUpdateInputSchema = z.object({
|
||||
scheduleId: z.number(),
|
||||
timeZone: timeZoneSchema.optional(),
|
||||
name: z.string().optional(),
|
||||
name: z.string().trim().min(1, "Schedule name cannot be empty").optional(),
|
||||
isDefault: z.boolean().optional(),
|
||||
schedule: z
|
||||
.array(
|
||||
|
||||
Reference in new issue
Block a user