@formkit/zod 0.17.0-71ddb3b → 0.17.0-7bf0733
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +0 -10
- package/dist/index.mjs +0 -10
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -79,14 +79,6 @@ function createZodPlugin(zodSchema, submitCallback) {
|
|
|
79
79
|
return false;
|
|
80
80
|
};
|
|
81
81
|
function performZodValidation(payload, node) {
|
|
82
|
-
// block submission while validation is running
|
|
83
|
-
node.store.set(core.createMessage({
|
|
84
|
-
type: 'state',
|
|
85
|
-
blocking: true,
|
|
86
|
-
visible: false,
|
|
87
|
-
value: true,
|
|
88
|
-
key: 'validating:zod',
|
|
89
|
-
}));
|
|
90
82
|
const zodResults = zodSchema.safeParse(payload);
|
|
91
83
|
if (!zodResults.success) {
|
|
92
84
|
setFormValidations(zodResults.error, node);
|
|
@@ -100,8 +92,6 @@ function createZodPlugin(zodSchema, submitCallback) {
|
|
|
100
92
|
});
|
|
101
93
|
zodValidationSet.clear();
|
|
102
94
|
}
|
|
103
|
-
// unblock submission
|
|
104
|
-
node.store.remove('validating:zod');
|
|
105
95
|
}
|
|
106
96
|
// The submit handler — validates the payload against the zod schema
|
|
107
97
|
// and then passes the data to the user's submit callback.
|
package/dist/index.mjs
CHANGED
|
@@ -75,14 +75,6 @@ function createZodPlugin(zodSchema, submitCallback) {
|
|
|
75
75
|
return false;
|
|
76
76
|
};
|
|
77
77
|
function performZodValidation(payload, node) {
|
|
78
|
-
// block submission while validation is running
|
|
79
|
-
node.store.set(createMessage({
|
|
80
|
-
type: 'state',
|
|
81
|
-
blocking: true,
|
|
82
|
-
visible: false,
|
|
83
|
-
value: true,
|
|
84
|
-
key: 'validating:zod',
|
|
85
|
-
}));
|
|
86
78
|
const zodResults = zodSchema.safeParse(payload);
|
|
87
79
|
if (!zodResults.success) {
|
|
88
80
|
setFormValidations(zodResults.error, node);
|
|
@@ -96,8 +88,6 @@ function createZodPlugin(zodSchema, submitCallback) {
|
|
|
96
88
|
});
|
|
97
89
|
zodValidationSet.clear();
|
|
98
90
|
}
|
|
99
|
-
// unblock submission
|
|
100
|
-
node.store.remove('validating:zod');
|
|
101
91
|
}
|
|
102
92
|
// The submit handler — validates the payload against the zod schema
|
|
103
93
|
// and then passes the data to the user's submit callback.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formkit/zod",
|
|
3
|
-
"version": "0.17.0-
|
|
3
|
+
"version": "0.17.0-7bf0733",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Zod validation for FormKit.",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"test": "jest"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@formkit/core": "0.17.0-
|
|
37
|
+
"@formkit/core": "0.17.0-7bf0733"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {},
|
|
40
40
|
"peerDependencies": {
|