AERC
Adan Enrique Ramirez Cisneros

Schema - Copy this React, Tailwind Component to your project

Generate a React form with TypeScript using React Hook Form and Zod for validation, based on the following type: typescript Copiar código export type InventarioEstaciones = { estacion: string inventarioMagna: number pVentasDiarias: number dInventariados1?: number inventarioPremium: number pVentasDiarias2: number dInventariados2?: number inventarioDiesel: number pVentasDiarias3: number dInventariados3?: number areaId: string } Validation: Use Zod to validate each field (e.g., string for estacion and areaId, number for the other fields). Optional fields: Fields marked with ? should be optional in the form. Components: Use appropriate input components (Input, NumberInput, etc.). Styling: Apply basic styling with Tailwind CSS or Material UI. Data handling: Implement a submit button and a function to handle form submission (e.g., onSubmit). Real time validation: Display specific error messages below each field if validation fails.

Prompt
Component Preview

About

schema - Create a dynamic React form with TypeScript using React Hook Form and Zod for validation. Built with React and Tailwind. Download instantly!

Share

Last updated 1 month ago