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

Superstruct v0.10 doesn't work #16

Closed
federico-moretti opened this issue Jul 1, 2020 · 19 comments
Closed

Superstruct v0.10 doesn't work #16

federico-moretti opened this issue Jul 1, 2020 · 19 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@federico-moretti
Copy link

Superstruct resolver doesn't work with the version 6.0.0, I tried the Yup resolver and it's working fine.

Steps to reproduce:

  • Click submit
  • It shows no errors and submit the values

https://codesandbox.io/s/currying-fire-um7b5

PS: thank you for the amazing library and hard work.

@bluebill1049
Copy link
Member

Here is what i did: https://codesandbox.io/s/react-hook-form-v6-superstructresolver-ed67i?file=/src/App.js What's the correct usage for superstructure? i followed its doc.

@federico-moretti
Copy link
Author

In your example the submit goes through even tho there are no values. In the Yup version if the validation fails it won't submit the form.

@bluebill1049
Copy link
Member

In superstruct i think for required you will have to write the logic yourself: https://codesandbox.io/s/react-hook-form-v6-superstructresolver-ed67i?file=/src/App.js

@jgeschwendt
Copy link

I think the problem is the superstruct version. It looks like there were some breaking changes between 0.8.x and 0.10.x
https://github.com/ianstormtaylor/superstruct/blob/master/Changelog.md#0100--june-6-2020

@bluebill1049
Copy link
Member

oh wow, i didn't know that. We are probably supporting the old version right now.

@bluebill1049 bluebill1049 transferred this issue from react-hook-form/react-hook-form Jul 3, 2020
@bluebill1049
Copy link
Member

We will support the old version for now then until more users want us to support that latest version.

@bluebill1049 bluebill1049 added the question Further information is requested label Jul 7, 2020
@pix2D
Copy link

pix2D commented Jul 8, 2020

Would love support for the latest version. 👀

@bluebill1049
Copy link
Member

Would love support for the latest version. 👀

send us a PR plz :)

@jgeschwendt
Copy link

I've played around with writing a resolver for the 0.10.x version but won't completely work until this issue gets fixed.

ianstormtaylor/superstruct#394

@bluebill1049
Copy link
Member

oh, thanks a lot @jgeschwendt 🙏

@bluebill1049 bluebill1049 changed the title Superstruct resolver doesn't work Superstruct v0.10 doesn't work Aug 6, 2020
@bluebill1049 bluebill1049 added dependencies Pull requests that update a dependency file and removed question Further information is requested labels Aug 20, 2020
@InSuperposition
Copy link

There is a PR open for the issue @jgeschwendt mentioned, hopefully, it will be merged soon.

ianstormtaylor/superstruct#440

@bluebill1049
Copy link
Member

@InSuperposition the PR has been sitting there for months...

@zenflow
Copy link

zenflow commented Nov 20, 2020

@bluebill1049 It just got merged 🚀

@bluebill1049
Copy link
Member

bluebill1049 commented Nov 20, 2020

oh wow! that's awesome, please send us a PR if you got time, otherwise, I will have a look at it over the weekend. exciting, superstruct is going to be working as well 👍 thank you for your amazing PR at superstruct.

@zenflow
Copy link

zenflow commented Nov 20, 2020

@bluebill1049 Awesome! I probably won't be first to making the PR though since I'm not familiar with how react-hook-form works & I haven't even used it yet lol.. But it looks awesome and I'm excited to try it next time I need a form library. Thanks for maintaining it 🤗

@bluebill1049
Copy link
Member

No worries @zenflow actually we probably can close this issue right? as long as the user starts to using 0.11?

@zenflow
Copy link

zenflow commented Nov 22, 2020

@bluebill1049 No I don't think we can close this yet. I saw a lot of changes in that project recently, including renaming some of the module exports. Probably those changes still need to be integrated here. A stable v1.0 release should come soon though ianstormtaylor/superstruct#491 (comment)

@bluebill1049
Copy link
Member

@bluebill1049 No I don't think we can close this yet. I saw a lot of changes in that project recently, including renaming some of the module exports. Probably those changes still need to be integrated here. A stable v1.0 release should come soon though ianstormtaylor/superstruct#491 (comment)

Thanks for the update. Will keep an eye on the V1 then.

@jorisre
Copy link
Member

jorisre commented Dec 1, 2020

@federico-moretti @pix2D & @InSuperposition Superstruct v0.10 supported ! You can update to the latest version of @hookfom/resolvers :) .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

7 participants