Open keyboardsamurai opened 1 year ago
Okay, so I have to retract the "duplicate" claim. It looks like this is actually correct behavior since one of the errors is of "type": "notOneOf" and the other has "type": "optionality". Sorry about that. I still think the path in the style of an array might be wrong though.
Describe the bug
When I construct a dynamic schema, like below, I will consistently get duplicate errors and the paths look like incorrectly serialized arrays, which is unexpected.
This will log the following output:
To Reproduce
https://codesandbox.io/s/crazy-gould-yr4k7z?file=/src/index.test.js
Expected behavior A clear and concise description of what you expected to happen. I would have expected a single error and a simple string as a path, pointing to additionalFields.somefield