schema
schema copied to clipboard
Get name of offending key
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.
I believe this is solved in #128 but it hasn't been released yet.
I'd really love to have this as well!