title: Mongoose - sub document validation not working
body: <p>I have a Schema that looks like so:</p>
  
  <pre><code>var minderSchema = mongoose.Schema({
    phones: {type: [{
      details: {
        type: {
          country_code: { type: String, required: true },
          region_code: { type: String, required: true },
          number: { type: Number, required: true }
        },
        required: true
      },
    }], required: true},
  })
  </code></pre>
  
  <p>That is... a minder is made up of an array of phones (which are required). Each phone must have a country code, region code and number. Yet the validation does not seem to work. I.e. I can create:</p>
  
  <pre><code>var minder = new Minder({
    "phones": [{
       details: {
          number: "3343434"
       }
     }]
  });
  </code></pre>
  
  <p>Which should not work, because it's missing a country code and region code. In fact I can create a document like this:</p>
  
  <pre><code>var minder = new Minder({
    "phones": [{
      details: {
        "sdf":"sdf"
      }
    }]
  });
  </code></pre>
  
  <p>And it validates.</p>
  
  <p>What concept am I missing?</p>