@conform-to/zod
Advanced tools
Comparing version 0.1.0 to 0.1.1
@@ -29,4 +29,3 @@ 'use strict'; | ||
function inferConstraint(schema) { | ||
var def = schema; // @ts-expect-error | ||
var def = schema; | ||
var constraint = { | ||
@@ -135,6 +134,2 @@ required: !def.isOptional() | ||
return value => { | ||
if (typeof value !== 'string' || value === '') { | ||
return; | ||
} | ||
return value === 'on'; | ||
@@ -141,0 +136,0 @@ }; |
@@ -5,4 +5,3 @@ import { parse as parse$1, transform, getName, getFieldElements } from '@conform-to/dom'; | ||
function inferConstraint(schema) { | ||
var def = schema; // @ts-expect-error | ||
var def = schema; | ||
var constraint = { | ||
@@ -111,6 +110,2 @@ required: !def.isOptional() | ||
return value => { | ||
if (typeof value !== 'string' || value === '') { | ||
return; | ||
} | ||
return value === 'on'; | ||
@@ -117,0 +112,0 @@ }; |
@@ -5,3 +5,3 @@ { | ||
"license": "MIT", | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"main": "index.js", | ||
@@ -18,3 +18,3 @@ "module": "module/index.js", | ||
"peerDependencies": { | ||
"@conform-to/dom": "0.1.0", | ||
"@conform-to/dom": "0.1.1", | ||
"zod": "^3.0.0" | ||
@@ -21,0 +21,0 @@ }, |
14522
407