I am building a REST API that enables users to POST a document that can contain several embedded documents. I have set up some validation rules both for the main document and the embedded documents.
When I make a request that has invalid data, then Mongoose first check the embedded documents for validation errors and whenever one of them fails, it will return the error, and ignore the rest of the document.
From a API consumer perspective, I think I'd like to get all the errors at once - both for all the embedded documents as well as the main document.
So my 2 questions are: