Array validations
const Group = attributes({
members: {
type: Array,
itemType: String,
minLength: 2,
maxLength: 5,
sparse: false,
unique: true
},
leaders: {
type: Array,
itemType: String,
minLength: 1,
maxLength: { attr: 'members' }
}
})Last updated