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
I want the the property "localized_words" to be an object mapping string to array.
With the following code, I can only ensure it's an Object, but how can I ensure the values are strictly array?
varschema=mongoose.Schema({// example// this should fail : { en: [], fr: 123 }// this should succeed: { en: [], fr: [] }// but with current code, any object will pass validationlocalized_words : {type: Object}});
The text was updated successfully, but these errors were encountered:
I want the the property "localized_words" to be an object mapping string to array.
With the following code, I can only ensure it's an Object, but how can I ensure the values are strictly array?
The text was updated successfully, but these errors were encountered: