tdegrunt / jsonschema

JSON Schema validation
Other
1.82k stars 262 forks source link

v.validate() on a specific property of a schema? #384

Open gordielachance opened 1 year ago

gordielachance commented 1 year ago

Hello, can I (and how can I) use v.validate() on a specific property of a JSON Schema, eg. for validating an instance on the ‘properties/playlist/properties/tracks’, or even ‘$defs/singleTrack’ within my schema ? Thanks!

awwright commented 1 year ago

@gordielachance If the result invalid and has errors, you can filter the list of errors based on the property it was found within. Does that make sense?