Socket
Book a DemoInstallSign in
Socket

@alinporumb/easyform

Package Overview
Dependencies
Maintainers
0
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@alinporumb/easyform

EasyForm is a lightweight React hook for easy form management with nested object support and Zod-based validations.

1.5.0
latest
npmnpm
Version published
Maintainers
0
Created
Source

EasyForm

EasyForm is a lightweight React hook for easy form management with nested object support and Zod-based validations.

Installation

npm install @alinporumb/easyform

API

useForm(options)

Options

  • defaultValue: Initial form values (object)
  • schema: Zod schema for form validation
  • onSubmit: Async function to handle form submission

Returns

  • fields: Object containing form fields with name, value, and onChange
  • errors: Object containing form errors
  • onSubmit: Function to handle form submission
  • values: Current form values
  • setErrors: Function to manually set errors

Features

  • Nested object support
  • Zod-based validation
  • Automatic error handling
  • Easy integration with existing forms

License

MIT

FAQs

Package last updated on 08 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.