tdegrunt / jsonschema

JSON Schema validation
Other
1.83k stars 263 forks source link

How to set throwAll? #355

Open littleKitchen opened 2 years ago

littleKitchen commented 2 years ago

When I try to do like this :

var result = v.validate(json, MessageSchema,{throwAll:true})

I can get the following result from the console:

1

If I remove "{throwAll:true}" The ValidatorResult like this: 2

Please Help

by the way, there is no "valid" property in ValidatorResult, am I missing something in the code?