Closed BradPrit09 closed 4 years ago
Yeah I would say this sort of error should never happen. I'll take a look at this. Are you able to reduce this to a test case?
This error is probably happening because you're passing undefined
as the schema.
Passing an invalid schema (anything but object/boolean) now throws a cleaner error, as of 7e1ace0559249b4bba018803c9eae46e75dbfdbd.
Please open a new issue if you have any further problems, and if possible, provide a code sample with expected and actual output.
When ever I try to get this schema from NoSql DB preferred :+1: mongoDB ,the validator is throwing error statementing that Cannot read property of _id is .
But :+1: When I parse the Json data of that document into respective Json Schema and passing it into var schema ,its working but when I fetch the schema(string) that I saved in the sub-sub document and passing as str into validate function its not working