Need help with react-hook-form?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

react-hook-form
16.0K Stars 744 Forks MIT License 2.4K Commits 10 Opened issues

Description

📋 React Hooks for forms validation (Web + React Native)

Services available

!
?

Need anything else?

Contributors list

Performant, flexible and extensible forms with easy to use validation.

npm downloads npm npm Discord

English | 繁中 | 简中 | 日本語 | 한국어 | Français | Italiano | Português | Español | Русский | Deutsch | Türkçe

Features

Install

npm install react-hook-form

Links

Quickstart

import React from 'react';
import { useForm } from 'react-hook-form';

function App() { const { register, handleSubmit, errors } = useForm(); // initialize the hook const onSubmit = (data) => { console.log(data); };

return (

{/* register an input */} {errors.lastname && 'Last name is required.'} {errors.age && 'Please enter number for age.'} ); }

Sponsors

Thanks go to these kind and lovely sponsors (company and individuals)!

@sayav @lemcii @washingtonsoares @lixunn @SamSamskies @peaonunes @wilhelmeek @iwarner @joejknowles @chris-gunawardena @Tymek @Luchanso @vcarel @gragland @tjshipe @krnlde @msutkowski @mlukaszczyk

Backers

Thanks go to all our backers! [Become a backer].

Organizations

Thanks go to these wonderful organizations! [Contribute].

Contributors

Thanks go to these wonderful people! [Become a contributor].

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.