title: I keep getting ($__ is not allowed) error while validating a perfectly valid object
body: <p>I using Node.js API's, I also use Joi package to validate my entries , but I keep getting error ($__ is not allowed) while the form I submit seems to be perfectly valid.
  I have searched a lot but couldn't find any useful solution.</p>
  
  <p>Joi version is use is 14.3.1,
  and the node version is 14.3.1</p>
  
  <p>here is the schema : </p>
  
  <pre><code>const schema = Joi.object({
      name: Joi.string().min(5).max(50).required(),
      price : Joi.object().required().allow(),
      description : Joi.string().min(15).max(400).required().allow(),
      isFavorate : Joi.boolean().required().allow(),
      place: Joi.object().required().allow(),
      tags : Joi.array().required().allow(),
      isDeliveryAvailable : Joi.boolean().required().allow(),
      rating: Joi.number().min(0).required().allow(),
      images : Joi.required().allow(),
      secondHand : Joi.required().allow()
  })
      return Joi.validate(item , schema) ;
  }
  </code></pre>
  
  <p>The form data: </p>
  
  <pre><code>{
      "name" : "an image",
      "price" : {
          "IQD" : 1000,
          "USD" : 10
      },
      "place" : {
          "name" : "fata rap"
      },
      "description" : "some item safas dfsa d",
      "isFavorate" : true,
      "tags": ["some tag 1", "tag 2"],
      "isDeliveryAvailable": true,
      "rating" : 4,
      "comments":["comment 1" , "comment 2"],
      "variants": [
          {"name": "item one variant one", "price":{
              "IQD":1000,
              "USD": 1}
          },
              {"name": "item one variant tow", "price":{
              "IQD":2000,
              "USD": 2}
          },
              {"name": "item one variant three", "price":{
              "IQD":1000,
              "USD": 1}
          }
          ],
      "category" : "5d479c60e35db51e3084c007",
      "secondHand" : "true"
  
  
  }
  </code></pre>
  
  <p>the model : </p>
  
  <pre><code>const Item = mongoose.model('Items',new  mongoose.Schema({
      name: {
          type : String,
          required: true,
          minlength : 5,
          maxlength : 50
      },
  
      price : {
          type: Object,
          IQD: {type : Number, required : true, min : 0},
          USD:  {type : Number, required : true, min : 0 }
      },
  
      description : {
          type : String,
          minlength : 15,
          maxlength : 400,
          required : true
      },
  
      isFavorate: {
          type: Boolean,
          default: false,
          required : true
      },
  
      place : {
        name : {
          type : Object,
          required : true,
        }
      },
  
      tags : {
          type : [String],
          required : true,
      },
  
      isDeliveryAvailable : {
          type : Boolean,
          default: true,
          required: true
      },
  
      rating: {
          type: Number,
          min : 0,
          max : 10,
          required : true
      },
  
      comments : {
          type : [String],
      },
  
      images: {
          type: [Buffer],
          requied : true
      },
  
      imageURLArray : [String],
  
      variants: [Object],
  
      category: {
          type : mongoose.Schema.Types.ObjectId,
          ref: 'Category'
      },
  
      subcategory: {
          type : mongoose.Schema.Types.ObjectId,
          ref: 'Subcategory'
      },
  
      secondHand : {
          type : Boolean,
          required : true,
          default : false
      }
  
  }));
  </code></pre>
  
  <p>Any ideas will be appreciated. Thanks</p>