diff options
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/User.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/server/models/User.js b/server/models/User.js index 401fb32..294c016 100644 --- a/server/models/User.js +++ b/server/models/User.js @@ -22,6 +22,7 @@ const UserSchema = new mongoose.Schema({ }, email: { type: String, + unique: [true, "Account with given email already exists!"], required: [true, "You need to provide an email."], maxLength: [100, "You can't have a email longer than 100 characters."], validate: { |