Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

rc-field-form

Package Overview
Dependencies
Maintainers
5
Versions
161
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rc-field-form

React Form Component

  • 2.6.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.4M
decreased by-7.75%
Maintainers
5
Weekly downloads
 
Created

What is rc-field-form?

The rc-field-form package is a React component library for managing form state and validation. It provides a set of tools to create complex forms with ease, including form validation, custom form controls, and form layout. It is designed to work with React's uncontrolled components and does not rely on external state management libraries.

What are rc-field-form's main functionalities?

Form and Field Components

Provides Form and Field components to create a form with validation rules. The Field component is used to define each form item with its validation rules.

{"<Form>
  <Field name='username' rules={[{ required: true }]}/>
  <Field name='password' rules={[{ required: true }]}/>
</Form>"}

Form Validation

Supports synchronous and asynchronous validation for form fields. The onFinish and onFinishFailed callbacks handle form submission and validation failure, respectively.

{"<Form onFinish={onFinish} onFinishFailed={onFinishFailed}>
  <Field name='email' rules={[{ type: 'email', required: true }]}/>
  <Field name='password' rules={[{ required: true }]}/>
  <button type='submit'>Submit</button>
</Form>"}

Custom Form Controls

Allows the integration of custom form controls by using the render props pattern. The control object contains the necessary props for the custom input, and the meta object contains validation error messages.

{"<Form>
  <Field name='customInput'>
    {(control, meta) => <CustomInput {...control} error={meta.errors[0]} />}
  </Field>
</Form>"}

Other packages similar to rc-field-form

Keywords

FAQs

Package last updated on 27 Nov 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc