Is this intended or a bug?
schema.pre('validate', () => ++pre);
schema.post('validate', () => ++post);
doc.validateSync(); // pre/post stay 0
await doc.validate(); // pre/post run
doc.validateSync() has a middleware: false option added in #15883 , but there's not validateSync middleware cycle at all right now.
I should either remove the option from the docs/TS, or add a validateSync synchronous middleware akin to init.
Thoughts? @vkarpov15 @hasezoey
Is this intended or a bug?
doc.validateSync()has amiddleware: falseoption added in #15883 , but there's not validateSync middleware cycle at all right now.I should either remove the option from the docs/TS, or add a validateSync synchronous middleware akin to
init.Thoughts? @vkarpov15 @hasezoey