I want to build \"minLength\" and \"maxLength\" in the mongoose schema validation rules, the current solution is:
var blogSchema = new Schema({ title: { re
maxlength and minlength now exist. You code should work as follows.
var mongoose = require('mongoose'); var blogSchema = new mongoose.Schema({ title: { type: String, required: true, minLength: 8, maxLength: 32 } });