### Install antd-zod for Zod 4 and Antd 6 Source: https://github.com/mrbr/antd-zod/blob/main/README.md Use this command to install the library when using Zod version 4 and Ant Design version 6. ```bash npm install antd-zod ``` -------------------------------- ### Install antd-zod for Zod 3 and Antd 5 Source: https://github.com/mrbr/antd-zod/blob/main/README.md Use this command to install the library when using Zod version 3 and Ant Design version 5. ```bash npm install antd-zod@6.1.0 ``` -------------------------------- ### Install antd-zod for Zod 4 and Antd 5 Source: https://github.com/mrbr/antd-zod/blob/main/README.md Use this command to install the library when using Zod version 4 and Ant Design version 5. ```bash npm install antd-zod@7.0.0 ``` -------------------------------- ### Basic Antd Form with Zod Validation Source: https://github.com/mrbr/antd-zod/blob/main/README.md Demonstrates how to create a Zod schema and use `createSchemaFieldRule` to apply it to Ant Design `Form.Item` components for string and number fields. Ensure the base schema is an object. ```jsx import z from 'zod'; import { Form, Button, Input, InputNumber } from 'antd'; import { createSchemaFieldRule } from 'antd-zod'; // Create zod schema - base schema MUST be an object const CustomFormValidationSchema = z.object({ fieldString: z.string(), fieldNumber: z.number(), }); // Create universal rule for Form.Item rules prop for EVERY schema field const rule = createSchemaFieldRule(CustomFormValidationSchema); // Set rule to Form.Item const SimpleForm = () => { return (
); }; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.