2.0.1 • Published 9 months ago
@sjsf/zod-validator v2.0.1
@sjsf/zod-validator
The zod based validator for svelte-jsonschema-form.
Installation
npm install @sjsf/zod-validator zod zod-to-json-schema json-schema-to-zodUsage
import { createForm, type Schema } from '@sjsf/form'
import { createFormValidator } from "@sjsf/zod-validator";
import { zodToJsonSchema } from "zod-to-json-schema";
import { z } from "zod";
const schema = z.object({
/* your schema */
});
const validator = createFormValidator(schema);
const form = createForm({
schema: zodToJsonSchema(schema) as Schema,
validator,
...
})License
MIT
2.0.1
9 months ago
2.0.0
9 months ago
2.0.0-next.15
9 months ago
2.0.0-next.14
9 months ago
2.0.0-next.13
9 months ago
2.0.0-next.12
9 months ago
2.0.0-next.11
10 months ago
2.0.0-next.10
10 months ago
2.0.0-next.9
10 months ago
2.0.0-next.8
11 months ago
2.0.0-next.7
11 months ago
2.0.0-next.6
11 months ago
2.0.0-next.5
11 months ago
2.0.0-next.4
11 months ago
2.0.0-next.3
11 months ago
2.0.0-next.2
12 months ago
2.0.0-next.1
12 months ago
2.0.0-next.0
12 months ago
1.9.2
1 year ago
1.9.1
1 year ago
1.9.0
1 year ago
1.8.0
1 year ago
1.7.0
1 year ago