Can you use it in this way, so that the maximal string length is 5 Characters, or is this "option" only for Numbers?
someString: {
type: String,
max: 5
},
Thanks!
No, min/max
is for Number
and Date
. For string, it's minLength/maxLength
.
More info here.