fix: Required "Add guests" button isn't required on attendee's end (#11381)
Co-authored-by: gitstart-calcom <gitstart@users.noreply.github.com>pull/11416/head^2
parent
837bf5d604
commit
8d9d7bbb25
|
@ -166,6 +166,12 @@ function preprocess<T extends z.ZodType>({
|
|||
|
||||
if (bookingField.type === "multiemail") {
|
||||
const emailsParsed = emailSchema.array().safeParse(value);
|
||||
|
||||
if (isRequired && (!value || value.length === 0)) {
|
||||
ctx.addIssue({ code: z.ZodIssueCode.custom, message: m(`error_required_field`) });
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!emailsParsed.success) {
|
||||
ctx.addIssue({
|
||||
code: z.ZodIssueCode.custom,
|
||||
|
|
Loading…
Reference in New Issue