isRequired with Formik / React Hook Form
See original GitHub issueDescription
It would be nice to have the option to signify a field that it is required
via Chakra UI API while using a 3rd party form validator tool
Problem Statement/Justification
Currently the isRequired
attribute conflicts with libraries like Formik / React Hook Form
With Formik from Docs live edit:
With React Hook Form browser’s validator kicks in
Proposed Solution or API
It would be nice to have an attribute that would only add the asterisk and the aria attribute
It can be called e.g. isRequiredIndicator
, isRequiredIndicatorOnly
, isRequiredAsterisk
or isRequiredVisual
, whatever
Alternatives
No response
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
React Hook Form vs. Formik: A technical ... - LogRocket Blog
Both Formik and React Hook Form are powerful libraries that will enable you to build any form you may need. They are architectured...
Read more >FAQs | React Hook Form - Simple React forms validation
React Hook Form, Formik or Redux Form? First of all, all libs try to solve the same problem: make the form building experience...
Read more >React Form Validation example with Hooks, Formik and Yup
Overview of React Hooks Form Validation example · Full Name: required · Username: required, from 6 to 20 characters · Email: required, email...
Read more >React Forms - Formik vs. Hook-Form vs. Final-Form - Blog
React Hook Form is a form library built around React hooks. This library takes a different approach to building Form. It isolates component...
Read more >Why You Should Choose React Hook Form Over Formik and ...
It's relatively easier to handle form validation in React Hook Form using the register hook. It also supports basic validation attributes such ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Crafted a temporary solution
In newer versions of chakra (at least 2.0.4) useStyles is deprecated, so it needs to be changed to useFormControlStyles