mirror of
https://github.com/usatiuk/ustk-todolist.git
synced 2025-10-28 15:47:48 +01:00
length validations
This commit is contained in:
@@ -13,6 +13,8 @@ const UserSchema = Schema({
|
||||
required: true,
|
||||
unique: true,
|
||||
validate: /^\S*$/,
|
||||
minLength: 3,
|
||||
maxLength: 50,
|
||||
},
|
||||
lists: [{ type: Schema.Types.ObjectId, ref: 'TodoList' }],
|
||||
todos: [{ type: Schema.Types.ObjectId, ref: 'Todo' }],
|
||||
|
||||
Reference in New Issue
Block a user