schema icon indicating copy to clipboard operation
schema copied to clipboard

Get name of offending key

Open richardolsson opened this issue 8 years ago • 1 comments

When a SchemaError is thrown, how can I know the name of the key for which the value failed validation? As far as I can tell, I cannot except perhaps by parsing the humanized error string.

An attempt to modify the library to support a separate error property for the key name seemed to indicate that a major refactor would be required to achieve this. Am I right?

Other than that, I love this repo and would really like to make it work for my (probably very common?) situation of wanting to feedback to the user what key failed validation.

richardolsson avatar Feb 07 '17 13:02 richardolsson

I believe this is solved in #128 but it hasn't been released yet.

I'd really love to have this as well!

dAnjou avatar Mar 10 '17 14:03 dAnjou