0👍
I fixed this problem by adding a minlength:1 parameter to the mongoose schema as per http://mongoosejs.com/docs/api.html#schema_string_SchemaString-minlength
const placeSchema = new Schema({
name: {
type: { String, minlength: 1},
required: true
}
});
I’d still like to know if this is the optimal. Thanks
- [Vuejs]-Vue.js build a view from an object using separate array
- [Vuejs]-Vuejs disable button depending array length
Source:stackexchange.com