You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minLength: [3,'Name must be at least 3 character'],
20
+
maxLength: [15,'Name should be less than 15 character'],
21
+
trim: true
7
22
},
8
23
email: {
9
24
type: String,
10
-
required: [true,'Email is required.'],
25
+
unique: true,
26
+
required: [true,'Email is required'],
27
+
trim: true,
28
+
match: [/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/,'Please Enter a valid email address']
11
29
},
12
30
password: {
13
31
type: String,
14
-
required: false,
32
+
required: [true,'Password is required'],
33
+
minLength: [8,'Password must be at least 8 character '],
34
+
match: [/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/,'Password must be contains at least one uppercase and one lowercase and one digit and one special character'],
0 commit comments