title: How to validate the schema structure which is nested json using another class as defined data type
body: <p>I don't know if this is right way to give define data type.</p>
  
  <p>I also tried using <code>@mapProp()</code> annotation.</p>
  
  <pre><code>class Temp extends Typegoose {
      @prop({ required: true, _id: false})
      unit!: string;
  
      @prop({ required: true, _id: false})
      value!: number;
  }
  class Temp2 extends Typegoose {
      @prop({ required: true,_id: false})
      unit2!: number;
  
      @prop({ required: true, _id: false})
      value2!: number;
  
      @prop({ required: true, _id: false})
      option2!: string;
  
  }
  class Temp3 extends Typegoose {
      @prop({ required: true, _id: false})
      unit3!: string;
  }
  export class UserModel extends Typegoose {
  
      @prop()
      field_type!: string;
  
      @prop({ _id : false, required: true})
      field_value!: Temp | Temp2 | Temp3;
  }
  </code></pre>
  
  <p>I want to get the <code>field_value</code> parameters only of these three kind.</p>
  
  <p>If: </p>
  
  <pre><code>"field_type" = "temp1"
  </code></pre>
  
  <p>Then:</p>
  
  <pre><code>"field_value" = { "unit2":32, "value2":3, "option2": "hello" }
  </code></pre>
  
  <p>Otherwise:</p>
  
  <p><strong>some error message</strong></p>