Versuchen Sie so etwas:
var enu = {
values: ['pending', 'accept', 'decline']
, message: 'Status is required.'
}
var ConnectionRequestSchema = new Schema({
...
status: {
type: String
, enum: enu
, trim: true
}
});
Versuchen Sie so etwas:
var enu = {
values: ['pending', 'accept', 'decline']
, message: 'Status is required.'
}
var ConnectionRequestSchema = new Schema({
...
status: {
type: String
, enum: enu
, trim: true
}
});