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

No validation on nested schema/data #288

Closed
kysley opened this issue Jul 9, 2020 · 3 comments
Closed

No validation on nested schema/data #288

kysley opened this issue Jul 9, 2020 · 3 comments

Comments

@kysley
Copy link

kysley commented Jul 9, 2020

Describe the bug
A Nope.object won't be validated when inside of a shape. This is useful for validating nested form input, as I am writing a resolver for react-hook-form here: react-hook-form/resolvers#18

To Reproduce
https://codesandbox.io/s/kind-water-4hso5?file=/src/index.js

The return value will be undefined, when it should be along the lines of ShapeError => user.name is missing!

Expected behavior
If you nest shapes, the nested shape fields should be validated.

@bvego
Copy link
Collaborator

bvego commented Apr 9, 2021

Sorry for waiting so long.. If it means anything now, I've fixed it and published a new version that contains the fix (0.12.0)

@bvego bvego closed this as completed Apr 9, 2021
@kysley
Copy link
Author

kysley commented Apr 9, 2021

Beautiful. Couldn’t have had better timing, believe it or not :)

@bvego
Copy link
Collaborator

bvego commented Apr 9, 2021

Awesome, glad to hear 😄! If the issue persists or you stumble upon something else please feel free to report it. I'll be maintaining this project actively from now on

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

No branches or pull requests

2 participants