DEV Community

Margaret W.N
Margaret W.N

Posted on

User Signup adjustments

I made a few a adjustments to my user model. The signup should require the first name, last name and the email should be unique.

const userModel = new Schema(
  {
    firstName: {
      type: String,
      required: true
    },
    lastName: {
      type: String,
      required: true
    },
    email: {
      type: String,
      required: true,
      unique: true
    },
  }
);
Enter fullscreen mode Exit fullscreen mode

Day 24

Discussion (0)