{/* Panel Header */}
From 8d97719165417786170637689c1d6c4866e00a25 Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 20 Feb 2026 16:06:06 +0000
Subject: [PATCH 3/3] 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>
---
examples/crm/objectstack.config.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/crm/objectstack.config.ts b/examples/crm/objectstack.config.ts
index 43f01d2d..5b829a6a 100644
--- a/examples/crm/objectstack.config.ts
+++ b/examples/crm/objectstack.config.ts
@@ -767,4 +767,4 @@ export default defineStack({
},
plugins: [],
-});
+}, { strict: false }); // Defer validation to `objectstack compile` CLI to avoid Zod double-parse transform bug on form.sections.columns