夏迎宾
夏迎宾

Reputation: 3

How to make mongodb verify that the error report points to the field name

When I defined JsonSchema on the collection, I thought that the data was not valid, I could see which field was wrong, but the error I got was: Document Failed Validation.

Is there any way to see which field of the Document?

Upvotes: 0

Views: 39

Answers (1)

Relequestual
Relequestual

Reputation: 12335

The current version of mongoDB doesn't provide you with detaild JSON Schema errors. You cannot simply use another implementation of JSON Schema to determine the error because mongoDB uses a modified version from an old version of JSON Schema. You may want to file a support request with them.

Upvotes: 2

Related Questions