Validate one schema property based on value of another property

后端 未结 0 1416
灰色年华
灰色年华 2021-01-12 08:16

My Schema is:

const testSchema = new mongoose.Schema({
  name: {
    type: String,
    trim: true,
    required: [true, \'Name is required\'],
    maxlength:          


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题