Skip to content

Commit 8d97719

Browse files
Copilothotlong
andcommitted
fix: resolve CRM example compile failure caused by Zod double-parse on form.sections.columns
The `defineStack()` in @objectstack/spec transforms `columns: '2'` (string) to `columns: 2` (number) via ZodPipe. When `objectstack compile` CLI then runs safeParse again on the already-transformed data, the number `2` fails the string enum validation expecting "1"|"2"|"3"|"4". Fix: pass `{ strict: false }` to `defineStack()` in the CRM example config, deferring validation to the compile CLI's single safeParse pass. Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent e27a3cf commit 8d97719

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

examples/crm/objectstack.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,4 +767,4 @@ export default defineStack({
767767

768768
},
769769
plugins: [],
770-
});
770+
}, { strict: false }); // Defer validation to `objectstack compile` CLI to avoid Zod double-parse transform bug on form.sections.columns

0 commit comments

Comments
 (0)