You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am planning to use json-schema-validator in C++ for validating JSON against a schema. I was wondering if there's a way to extract the 'errorMessage' directly when a JSON schema validation fails.
In my use case, I have a JSON schema with specific validation rules and I want to provide informative error messages to the end users when their JSON fails to validate against the schema. I noticed that there are 'errorMessage' annotations in the JSON schema draft-07, which allow for custom error messages.
My question is, does json-schema-validator support these 'errorMessage' annotations and if so, how can I extract these custom error messages when a validation error occurs? Any help on this would be greatly appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I am planning to use json-schema-validator in C++ for validating JSON against a schema. I was wondering if there's a way to extract the 'errorMessage' directly when a JSON schema validation fails.
In my use case, I have a JSON schema with specific validation rules and I want to provide informative error messages to the end users when their JSON fails to validate against the schema. I noticed that there are 'errorMessage' annotations in the JSON schema draft-07, which allow for custom error messages.
My question is, does json-schema-validator support these 'errorMessage' annotations and if so, how can I extract these custom error messages when a validation error occurs? Any help on this would be greatly appreciated.
Thank you.
Beta Was this translation helpful? Give feedback.
All reactions