# Generate a schema
Generates a zod schema.
Tags: zod, schema, pocketbase

$ vela generate schema contact name:text email:email

## Tutorials

- [Generate Zod schemas for your SvelteKit models from a field list](https://velastack.dev/tutorials/sveltekit-zod-schema-generator)

## src/lib/schemas/contact.ts

```ts
import { z } from "zod";

export const contactSchema = z.object({
  name: z.string().optional(),
  email: z.email().optional(),
});
```
