Started improvement of validators and respective error messages
This commit is contained in:
parent
8305494915
commit
a6228a9fd9
5 changed files with 180 additions and 22 deletions
|
|
@ -42,7 +42,8 @@ const channelSchema = new mongoose.Schema({
|
|||
name: {
|
||||
type: mongoose.SchemaTypes.String,
|
||||
required: true,
|
||||
maxLength: 50,
|
||||
//Calculate max length by the validator max length and the size of an escaped character
|
||||
maxLength: 50 * 6,
|
||||
default: 0
|
||||
},
|
||||
description: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue