mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-28 23:57:49 +01:00
length validations
This commit is contained in:
@@ -6,6 +6,8 @@ const TodoSchema = Schema({
|
||||
text: {
|
||||
type: String,
|
||||
required: true,
|
||||
minLength: 1,
|
||||
maxLength: 300,
|
||||
},
|
||||
list: { type: Schema.Types.ObjectId, ref: 'TodoList', required: true },
|
||||
user: { type: Schema.Types.ObjectId, ref: 'User', required: true },
|
||||
|
||||
Reference in New Issue
Block a user