VRMS
VRMS copied to clipboard
Improve integrations for react-hook-form across components
Overview
Outline of steps to integrate react-hook-form's validation more seamlessly, so that we write cleaner, more reusable code, with a single way of achieving form validaiton across the project.
Context
Validation has been a sticking point for this project, but thanks to the hard work of the devs on this team we're moving towards having this portion of our app handled. We've still got a bit to go, this issue is going to outline the steps to take to integrate react-hook-form's validation more seamlessly.
Action Items
- [x] #1482
- [x] #1483
- [x] Remove duplicates of simpleInput other places in the app eg
addProjcet
andeditProject
- [x] Replace the above with import of simpleInput
- [x] Remove duplicates of simpleInput other places in the app eg
- [ ] #1484
- [ ] Merge validation functions made by @evanyang1
- [ ] Potentially adapt validation functions to fit react-hook-form validate format
- [ ] Adapt simpleInput to contain a validations array that will be consumed by ValidatedTextField
- [ ] Adapt simpleInput and ValidatedText field to accept helper form fields eg radio buttons
@Spiteless Thank you for creating this issue.
I see that you have below as the overview:
Validation has been a sticking point for this project, but thanks to the hard work of the devs on this team we're moving towards having this portion of our app handled. We've still got a bit to go, this issue is going to outline the steps to take to integrate react-hook-form's validation more seamlessly.
Please rewrite the overview in the format of: "we need to do X for Y reason." "outline the steps to take to integrate react-hook-form's validation more seamlessly, so that (Y reason)__"
Bonnie would like to discuss adding additional dependencies & sustainability plan.
@JackHaeg Updated