-
Notifications
You must be signed in to change notification settings - Fork 934
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
Comments
espenhw
added a commit
to espenhw/yup
that referenced
this issue
May 24, 2019
espenhw
added a commit
to espenhw/yup
that referenced
this issue
May 24, 2019
jquense
pushed a commit
that referenced
this issue
May 24, 2019
@jquense 👋 |
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
When validating an object with dotted keys (e.g.
{foo: {'bar.baz': 'zot'}}
) any thrown ValidationErrors will have apath
that can't be used with things like lodash'sget
, 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 bea["b.c"]
.The text was updated successfully, but these errors were encountered: