title: How to validate the items of an array with ajv?
body: <p>I have my validator defined as follows </p>
  
  <pre><code>var abcSchemaValidator = {
  "type": "object",
  "required": [],
  "properties": {
      "remarks": {
          "type": "string",
          "maxLength": 2000
      },
      "comment": {
          "type": "string",
          "maxLength": 2000
      }
  }
  };
  </code></pre>
  
  <p>In my code where I am applying these validations, I am doing something like this </p>
  
  <pre><code>modelObject.remarks = sometext;
  
  modelObject.parent[0].comment
  </code></pre>
  
  <p>So when I run my ajv validation using the following code </p>
  
  <pre><code>let validate = ajv.compile(schema);
  let validResult = validate(data);
  </code></pre>
  
  <p>The remarks is validated properly whereas the comment is not. I can see why the remarks is straightforward but I am not sure how to make the comment work. Should I change the comment to parent.comment in the schemaValidator? I tried changing to parent[0].comment but that didn't work. </p>