Hi,
I am currently using a custom function to insert a document into a collection. I want to do this on server side as I need some data I don’t want to retrieve on the client side. However, I discovered that even if the function that finally inserts the document is executed with the permission of the user calling, when inserting rules and schema seem to be bypassed. When running manual validation added documents are shown as errors due to an obvious error on my side, but that’s not the point.
Is there really no validation or is there something I might have missed? As always it is quite hard to find proper documentation. I tried to specifically set a flag collection.insertOne(doc, {bypassDocumentValidation: false}), but it just did nothing.
Best regards