title: How to handle independently with errors of multiple uniques in mongoose?
body: <p>I have a Schema with multiple uniques like this:</p>
  
  <pre><code>var userSchema = new mongoose.Schema({
    user: {
      type: String,
      unique: true
    },
    email: {
      type: String,
      unique: true
    }
  });
  </code></pre>
  
  <p>During a save trying I know that I can access the property <code>err.code</code> <strong>(11000)</strong> to handle unique errors, like this:</p>
  
  <pre><code>user.save((err, doc) =&gt; {
      if(!err) {
        res.send(doc);
      } else {
        if (err.code == 11000)
          res.status(422).send(['Message here!']);
      }
    });
  </code></pre>
  
  <p>So, in this case I'd like to set custom messages for both fields: <strong>user</strong> and <strong>email</strong>.
  Is there any way to do that?</p>