Stop treating login/save-progress as a 48-character email limit.
The overlay was failing Zod on preset method-card support text attached with the draft; raise that cap, allow RFC-length emails, and drop Back to home from the overlay. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,11 @@
|
||||
import { z } from "zod";
|
||||
import { FLOW_STEP_ORDER } from "../../../app/(app)/create/utils/flowSteps";
|
||||
import { customMethodCardFieldBlocksByIdSchema } from "../../../lib/create/customMethodCardFieldBlocks";
|
||||
import {
|
||||
CUSTOM_METHOD_CARD_WIZARD_MAX_DESCRIPTION_CHARS,
|
||||
CUSTOM_METHOD_CARD_WIZARD_MAX_FIELD_CHARS,
|
||||
} from "../../../lib/create/customMethodCardWizardConstants";
|
||||
import { EMAIL_MAX_LEN } from "../../../lib/create/isValidCreateFlowSaveEmail";
|
||||
import { MAX_STAKEHOLDER_EMAILS } from "../../../lib/create/stakeholderLimits";
|
||||
import { assertPlainJsonValue, DEFAULT_PLAIN_JSON_LIMITS } from "./plainJson";
|
||||
|
||||
@@ -62,8 +67,8 @@ const conflictManagementDetailEntrySchema = z.object({
|
||||
});
|
||||
|
||||
const customMethodCardMetaEntrySchema = z.object({
|
||||
label: z.string().max(48),
|
||||
supportText: z.string().max(48),
|
||||
label: z.string().max(CUSTOM_METHOD_CARD_WIZARD_MAX_FIELD_CHARS),
|
||||
supportText: z.string().max(CUSTOM_METHOD_CARD_WIZARD_MAX_DESCRIPTION_CHARS),
|
||||
});
|
||||
|
||||
/** Normalized (trim + lowercase) stakeholder email for drafts + publish. */
|
||||
@@ -226,7 +231,7 @@ export const putDraftBodySchema = z.object({
|
||||
export type CreateFlowStateValidated = z.infer<typeof createFlowStateSchema>;
|
||||
|
||||
export const magicLinkRequestBodySchema = z.object({
|
||||
email: z.string(),
|
||||
email: z.string().max(EMAIL_MAX_LEN),
|
||||
next: z.string().optional(),
|
||||
draft: createFlowStateSchema.optional(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user