You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I put a value inside the array it works, like so:
data=parents: ['blah']
Similarly, if I remove the required: true from the schema, it also starts working.
Is an empty array not considered satisfactory for "required" validation? I understand it's false in javascript, but there are plenty of cases where empty arrays and objects are intended in Mongo documents.
The text was updated successfully, but these errors were encountered:
I have an array field with the following schema on that field:
When I try to create a document with the following data:
I get the following error:
If I put a value inside the array it works, like so:
Similarly, if I remove the
required: true
from the schema, it also starts working.Is an empty array not considered satisfactory for "required" validation? I understand it's false in javascript, but there are plenty of cases where empty arrays and objects are intended in Mongo documents.
The text was updated successfully, but these errors were encountered: