title: Handling validations of required fields of a map inside a list in Moqui
body: <p>For adding validations for the mandatory fields for a service being developed for a REST API, I am able to use the “required” attribute which validates the fields when set to true. This worked as expected for parameters marked with required=”true”, in a map.</p>
  
  <p>However, for the use-case where I have a list, say, I want my service to take items <strong>list</strong> as input and would like to validate some required fields for each item, it does not automatically validate the fields with required="true".</p>
  
  <p>I am able to handle this by adding extra logic in the code, but wanted to check if there is a recommended way for this or if anything is missed here which can automatically handle such validations in Moqui?</p>
  
  <p>Example service definition:</p>
  
  <pre><code>&lt;service verb="create" noun="Example"&gt;
     &lt;in-parameters&gt;
         &lt;parameter name="user" type="Map" required="true"&gt;
             &lt;parameter name="firstName" required="true"/&gt;
             &lt;parameter name="lastName" required="true"/&gt;
         &lt;/parameter&gt;
         &lt;!-- Below list does not validate required fields --&gt;
         &lt;parameter name="items" type="List" required="true"&gt;
             &lt;parameter name="itemMap" type="Map" required="true"&gt;
                 &lt;parameter name="name" required="true"/&gt;
                 &lt;parameter name="description"/&gt;
             &lt;/parameter&gt;
         &lt;/parameter&gt;
     &lt;/in-parameters&gt;
     &lt;actions&gt;
        ...
     &lt;/actions&gt;
  &lt;/service&gt;
  
  </code></pre>