Started improvement of validators and respective error messages

This commit is contained in:
rainbow napkin 2025-04-29 00:13:19 -04:00
parent 8305494915
commit a6228a9fd9
5 changed files with 180 additions and 22 deletions

View file

@ -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: {