2.0.1 • Published 1 month ago

@sjsf/zod-validator v2.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
1 month ago

@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-zod

Usage

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

1 month ago

2.0.0

1 month ago

2.0.0-next.15

2 months ago

2.0.0-next.14

2 months ago

2.0.0-next.13

2 months ago

2.0.0-next.12

2 months ago

2.0.0-next.11

2 months ago

2.0.0-next.10

3 months ago

2.0.0-next.9

3 months ago

2.0.0-next.8

3 months ago

2.0.0-next.7

4 months ago

2.0.0-next.6

4 months ago

2.0.0-next.5

4 months ago

2.0.0-next.4

4 months ago

2.0.0-next.3

4 months ago

2.0.0-next.2

4 months ago

2.0.0-next.1

4 months ago

2.0.0-next.0

4 months ago

1.9.2

6 months ago

1.9.1

6 months ago

1.9.0

6 months ago

1.8.0

6 months ago

1.7.0

8 months ago