For a form validation library for React, the first results are react-hook-form/react-hook-form, bluebill1049/react-hook-form (react-hook-form is a dedicated React form validation library built entirely on hooks, supporting schema-based validation via Zod, Yup, or custom rules, with built-in error handling and form state management — exactly the declarative, hook-driven approach this search is about) and jaredpalmer/formik (Formik is a React form validation library that provides hooks, declarative validation rules including schema-based with Yup, custom validation, error display, and full form state management, making it a comprehensive match for this search). final-form/react-final-form and rjsf-team/react-jsonschema-form round out the shortlist. Compare the match explanations and check the project documentation against your requirements.
These open-source libraries provide robust schema validation and state management solutions for React application forms.
React Hook Form is a state management library designed to handle form registration, validation, and submission lifecycle events. By decoupling form control logic from the standard component lifecycle, it enables the creation of performant forms that minimize unnecessary re-renders. The library integrates with external schema validation tools to enforce data integrity and provides a declarative framework for managing complex form structures. The project distinguishes itself through a subscription-based architecture that tracks property access to ensure components only update when the specific
React Hook Form is precisely what you're looking for: it's a React form library built around hooks, offering declarative validation with schema integration (like Yup or Zod), custom rules, error handling, and efficient form state management through its subscription-based architecture, hitting every requested feature squarely.
react-hook-form is a React form state management library and cross-platform UI hook used to manage form inputs, validation, and submission state. It functions as an uncontrolled form controller, leveraging uncontrolled components to minimize unnecessary re-renders in web and mobile environments. The library provides schema-based form validation, allowing user input to be verified against predefined rules or external schema libraries to ensure data integrity. It is designed to connect form logic to components across both React and React Native applications. The project covers the integration
react-hook-form is a dedicated React form validation library built entirely on hooks, supporting schema-based validation via Zod, Yup, or custom rules, with built-in error handling and form state management — exactly the declarative, hook-driven approach this search is about.
Formik is a React form management library and state management tool. It serves as a client-side form validator for checking user entries against defined rules and managing associated error messages before submission. The library synchronizes user input values across multiple fields into a single object for retrieval and manipulates the transition of form data from initial entry through validation and final submission. It provides capabilities for tracking complex form state, managing form submissions, and validating user inputs to ensure data integrity.
Formik is a React form validation library that provides hooks, declarative validation rules (including schema-based with Yup), custom validation, error display, and full form state management, making it a comprehensive match for this search.
react-final-form is a React form state management library that provides a framework for declarative form validation and the orchestration of dynamic input fields. It utilizes a subscription-based state manager to trigger interface updates only for the specific fields that change during user input, which optimizes rendering by limiting unnecessary component re-renders. The library functions as a dynamic input field orchestrator, allowing users to add, remove, or reorder lists of form fields. It manages complex form state through a system that supports conditional field rendering and real-time
react-final-form is a declarative React form state and validation library that supports custom validators and dynamic fields, but it relies on render props and higher-order components rather than React hooks, and lacks built-in schema-based validation, so it fits the category but misses the hooks and schema features requested.
This project is a declarative framework for building interactive web forms by parsing JSON Schema definitions. It functions as a component-based generator that automatically maps schema constraints to input fields and validation logic, ensuring that data collection remains consistent with defined structures. The library distinguishes itself through a registry-based architecture that allows for extensive customization of the user interface. Developers can override default widgets, field templates, and layout structures to accommodate unique data types or specific design requirements. It suppor
A declarative JSON Schema-driven form builder with built-in validation and state management—natively React and schema-based, but it doesn't expose hooks for validation as a primary interface, so while it covers most of your required features, it's not the hook-centric library you might be envisioning.
redux-form is a library for managing HTML form state and validation within a Redux store using React components. It functions as a state manager that synchronizes input values and interaction metadata to maintain a single source of truth in a global state container. The project provides mechanisms for orchestrating dynamic arrays of input fields that can be added, removed, or reordered in real time. It also includes a system for splitting complex data entry into a sequence of pages to create multi-step form wizards. Additional capabilities cover client-side data validation through synchronou
redux-form is a React form validation library that manages form state via Redux, fitting the search for a form validation tool, though it relies on a global state container and higher-order components rather than a hooks-first design.
This project is a reactive state management library designed for handling complex form data and validation logic. It utilizes observable-based patterns to synchronize user interface components with underlying data models, ensuring that form states remain consistent throughout an application. The library provides a structured approach to managing form initialization, field tracking, and lifecycle events. The library distinguishes itself through its support for deeply nested data structures and hierarchical composition, allowing for recursive validation and dynamic updates within complex object
This is a React form validation library using MobX for reactive state management, so it fits the category but relies on MobX observables rather than React hooks, which may not align with the hooks-specific request.
Redux-form is a form state management library that synchronizes user input and form metadata with a global Redux store. It acts as a bridge between form input fields and the Redux ecosystem, ensuring predictable state transitions through a centralized state manager. The library utilizes Higher Order Components to connect React applications to the Redux store. This approach offloads state management from local components to a global store, facilitating the orchestration of complex forms with numerous fields. The system maintains consistency through a unidirectional data flow, integrating form
Redux Form is a form state management library tied to the global Redux store using Higher-Order Components, not hooks, and it doesn't center on declarative validation rules or schema-based validation, so it doesn't fit the specific request for a hooks-driven validation library.
This project is a jQuery-based form validation library designed to verify HTML form input values on the client side before submission. It functions as an input validator that enforces data integrity constraints through rule-based verification and value normalization. The library focuses on web accessibility compliance by linking error messages to input fields via ARIA attributes, ensuring that screen readers can announce validation failures to the user. The system supports the creation of custom validation rules and the transformation of raw input strings through a normalization pipeline. Co
This is a jQuery form validation library, not a React-specific one, so it lacks the React hooks integration, schema-based validation, and declarative patterns you are looking for.
Superstruct is a JavaScript and TypeScript data validation library used to verify that data structures match defined shapes and types. It functions as a composable schema builder and a TypeScript schema validator, ensuring that runtime data checks remain synchronized with static type definitions. The library features a data coercion engine that transforms input values or injects default values before the validation process is executed. It enables the creation of complex validation rules by nesting, merging, or omitting properties from existing structures. Its capabilities cover the validatio
Superstruct is a general-purpose schema-based data validation library for JavaScript/TypeScript, not tailored to React forms—it lacks built-in React hooks, form state management, and the declarative form-specific features you need.
Vee-validate is a form validation library and state management tool for Vue applications. It enables the validation of user inputs through declarative rules and tracks form metadata, including submission status and dirty states. The library functions as a wrapper for integrating external schema validation libraries to enforce consistent data shapes. It also serves as an internationalized framework for displaying translated error messages and localized feedback. The project covers broad capability areas including form state management, the handling of complex nested data structures, and the s
Vee-Validate is a form validation library for Vue applications with declarative rules, schema support, and state management, but it is built for the Vue ecosystem, not React, so it does not match a search for a React-specific form validation library.
Yup is a JavaScript schema validation library used to define data shapes and validate runtime values. It functions as an object schema validator and a data coercion engine, allowing developers to transform raw input values into desired types before performing validation checks. The library is distinguished by its support for dynamic schema validation, where rules can be adjusted at runtime based on sibling field values or external context. It also enables recursive data structuring for polymorphic fields and provides a system for extracting static TypeScript interfaces from runtime schema def
Yup is a general-purpose JavaScript schema validation library that can be integrated with React forms via wrappers like Formik, but it is not itself a React-specific form validation library with hooks or form state management.
| Repository | Stars | Language | License | Last push |
|---|---|---|---|---|
| react-hook-form/react-hook-form | 44.8K | TypeScript | MIT | |
| bluebill1049/react-hook-form | 44.8K | TypeScript | MIT | |
| 34.3K |
| TypeScript |
| Apache-2.0 |
| final-form/react-final-form | 7.4K | JavaScript | MIT |
| rjsf-team/react-jsonschema-form | 15.7K | TypeScript | apache-2.0 |
| redux-form/redux-form | 12.5K | JavaScript | MIT |
| foxhound87/mobx-react-form | 1.1K | TypeScript | MIT |
| erikras/redux-form | 12.5K | JavaScript | MIT |
| jzaefferer/jquery-validation | 10.3K | JavaScript | MIT |
| ianstormtaylor/superstruct | 7.1K | TypeScript | MIT |