VRMS icon indicating copy to clipboard operation
VRMS copied to clipboard

Improve integrations for react-hook-form across components

Open trillium opened this issue 1 year ago • 3 comments

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 and editProject
    • [x] Replace the above with import of simpleInput
  • [ ] #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

trillium avatar Aug 27 '23 17:08 trillium

@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)__"

JackHaeg avatar Aug 31 '23 23:08 JackHaeg

Bonnie would like to discuss adding additional dependencies & sustainability plan.

JackHaeg avatar Aug 31 '23 23:08 JackHaeg

@JackHaeg Updated

trillium avatar Sep 01 '23 18:09 trillium