fix: can save an event type without a slug (#21922)
This commit is contained in:
@@ -228,7 +228,13 @@ export type IntervalLimitsType = IntervalLimit | null;
|
||||
|
||||
export { intervalLimitsType } from "@calcom/lib/intervalLimits/intervalLimitSchema";
|
||||
|
||||
export const eventTypeSlug = z.string().transform((val) => slugify(val.trim()));
|
||||
export const eventTypeSlug = z
|
||||
.string()
|
||||
.trim()
|
||||
.transform((val) => slugify(val))
|
||||
.refine((val) => val.length >= 1, {
|
||||
message: "Please enter at least one character",
|
||||
});
|
||||
|
||||
export const stringToDate = z.string().transform((a) => new Date(a));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user