Migrate from Zod v3 to v4 (#14639)
Closes [#1526](https://github.com/twentyhq/core-team-issues/issues/1526) --------- Co-authored-by: Félix Malfait <felix@twenty.com> Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
co-authored by
Félix Malfait
Félix Malfait
parent
8d78032357
commit
3cada58908
+2
-2
@@ -1,9 +1,9 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
const schema = z
|
||||
.record(z.any())
|
||||
.record(z.string(), z.any())
|
||||
.refine((data) => Object.keys(data).every((key) => !key.match(/\s/)), {
|
||||
message: 'JSON keys cannot contain spaces',
|
||||
error: 'JSON keys cannot contain spaces',
|
||||
});
|
||||
|
||||
export const parseAndValidateVariableFriendlyStringifiedJson = (
|
||||
|
||||
Reference in New Issue
Block a user