title: how to validate password's length using mongoose scheme?
body: <p>In my mongoose Schema i used below code for the password field..but  it doesn't check for the minimum length for the password..what is wrong here??  </p>
  
  <pre><code> password:{
      type:String,
      required:true,
      match:/(?=.*\d)(?=.*[a-z])(?=.*[A-Z])/,
      minlength:5
  
  
    },
  </code></pre>