title: How to validate a list of elements of specific type in marshmallow?
body: <p>I have a POST endpoint in flask which takes a json data which contains a key - <code>collections</code> which has a list as value which in turn contains list of dictionaries containing specific keys in it.</p>
  
  <p>I'm trying to validate the <code>request.json</code> but couldn't find a proper way to do it.</p>
  
  <p>Here's the code for marshmallow schemas:</p>
  
  <pre><code>class RowSchema(Schema):
      nationalCustomerId = fields.Int(required=True)
      storeId = fields.Int(required=True)
      categoryId = fields.Int(required=True)
      deliveryDate = fields.Date(required=True, format="%Y-%m-%d")
  
  class RequestSchema(Schema):
      combinations = fields.List(RowSchema)
  </code></pre>
  
  <p>I was trying to validate the <code>request.json</code> with <code>RequestSchema</code>.</p>
  
  <p>The <code>request.json</code> I'm sending is like below:</p>
  
  <pre><code>{
      "combinations": [
              {
                  "nationalCustomerId": 1,
                  "storeId": 1,
                  "categoryId": 1,
                  "deliveryDate": "2020-01-20"
              }
          ]
  }
  </code></pre>
  
  <p>Where am I making mistake?</p>
  
  <p>This is the error I'm getting:</p>
  
  <blockquote>
    <p>ValueError: The list elements must be a subclass or instance of
    marshmallow.base.FieldABC.</p>
  </blockquote>