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

Wrong path in ValidationError when validating an object with dotted keys #536

Closed
espenhw opened this issue May 23, 2019 · 2 comments · Fixed by #539
Closed

Wrong path in ValidationError when validating an object with dotted keys #536

espenhw opened this issue May 23, 2019 · 2 comments · Fixed by #539

Comments

@espenhw
Copy link
Contributor

espenhw commented May 23, 2019

When validating an object with dotted keys (e.g. {foo: {'bar.baz': 'zot'}}) any thrown ValidationErrors will have a path that can't be used with things like lodash's get, and that will confuse e.g. Formik's error handling.

Example here: https://runkit.com/espenhw/5ce6a57a7e042f001a056407 - I'd like the path on the ValidationError to be a["b.c"].

@vasilich6107
Copy link

@jquense 👋
Thanks for the fix.
Are you planing to make a release any time soon?

@gsouf
Copy link

gsouf commented Apr 12, 2021

This breaks the ability to figure out the initial path string.

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

Successfully merging a pull request may close this issue.

3 participants