UNPKG
zod-form-kit
Version:
latest (1.0.0)
1.0.0
UI-agnostic form generation library based on Zod schemas with extensible adapter pattern
zod-form-kit
/
dist
/
types
/
form-generator.js
10 lines
(9 loc)
•
253 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
import { z }
from
'zod'
;
// Defines the primitive types that are supported by the form generator.
export
const
supportedPrimitives
= z.
union
([ z.
string
(), z.
number
(), z.
boolean
(), z.
date
(), z.
enum
([
''
]),
// Placeholder for enums
]);