Validating password / confirm password with Mongoose schema

前端 未结 7 2179
小蘑菇
小蘑菇 2020-12-08 17:15

I have a userSchema that looks like this:

var userSchema = new Schema({
    name: {
      type: String
    , required: true
    , validate: [val         


        
7条回答
  •  鱼传尺愫
    2020-12-08 17:34

    The second verification password doesn't need to be submitted for registration. You could probably get away with validating the two fields are equal on the client-side.

提交回复
热议问题