Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[manager]: use react-hook-form & validation library #13395

Open
1 task done
tristanwagner opened this issue Oct 2, 2024 · 3 comments
Open
1 task done

[manager]: use react-hook-form & validation library #13395

tristanwagner opened this issue Oct 2, 2024 · 3 comments

Comments

@tristanwagner
Copy link
Contributor

tristanwagner commented Oct 2, 2024

Have you already checked if a similar item is present on manager-components?

  • Yes, I have already checked the existing components/hooks/utils.

What do you expect from this request?

Others

Description

To have a clean way of handling forms and do data validations via schemas we would like to use in zimbra a new dependency react-hook-form along with a schema validating library for example zod, joi or yup. These are widely used and a must have for form handling and data validation with type inference etc.. Can we discuss about this ?

Where do you expect to use this?

@ovh-ux/manager-zimbra-app

Do you have mock-up?

No response

When do you expect this to be delivered?

ASAP

Additional Information

No response

@aboungnaseng-ovhcloud
Copy link
Contributor

  • agre for react-hook-form we already use this in pci universe

@aboungnaseng-ovhcloud
Copy link
Contributor

aboungnaseng-ovhcloud commented Oct 2, 2024

Lets share with the team the differents packages

  • zod,
  • joi
  • yup

As I never use theses dependencies, you can share a message to the react js channel to have some user experience.

The only things we have to be careful its about the size of app and we need to have the same coding style inside the manager, to not have a lot of differences beetween react app, (more easy to review, more easy to debug ...)

@tristanwagner
Copy link
Contributor Author

as I mentioned earlier I've used more or less all of these in differents projects and it's more or less the same thing, but I think zod is the most popular and used and the type inference is a very nice feature for using it with react-hook-form, yup is more on lightweight and simplicity and is also the oldest and least used of the 3, and finally joi is in between the 2.

To me I would chose between zod more features but bigger size or yup simplicity and lightweight but less features

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants