Open WilliamT-Streamba opened 6 years ago
You would need to post a link to a simple app that reproduces this. Hard to say without seeing the whole setup.
I'm facing the same issue. In my case, it seems like a field (which itself is a nested SimpleSchema object) is wiped out during cleaning, and then the insert validation fails with Error: <field> is required in <collection> insert
. Though, if I validate the object manually, the validation succeeds.
I have a schema which references a sub schema.
When I validate the schema manually with SimpleSchema.validate it succeeds. However, when I try and insert the item it fails saying the keys of the sub schema are not valid.
The exact same code works in another project. The only difference is this is based off a package based architecture so the attachSchema code is inside a package that is imported into the project.
Any suggestions of where to look for the cause?
I've checked that the sub schema is part of the schema when it is attached to the collection.