title: Nested array validation laravel
body: <p>I am building a REST based API, where one of the API is having the following request</p>
  
  <pre><code>{
     "categories_id" :"1",
     "product_name" : "Pen",
     "product_description" : "this is pen",
     "tags" : "pen,write",
     "image_count" : "4",
     "skus": 
        {
            "is_shippable":"n",
            "actual_price":"100.55", 
            "selling_price":"200.45",
            "quantity_type":"bucket",
            "quantity_total":"10",
            "bucket_value":"instock",
            "sort_order":"1"
        }
  }
  </code></pre>
  
  <p>These are my validation rules</p>
  
  <pre><code>protected $rules = [
          ValidatorInterface::RULE_CREATE =&gt; [
          'users_id' =&gt; 'required',
          'user_profiles_id' =&gt; 'required',
          'categories_id' =&gt; 'required',
          'product_name' =&gt; 'required|max:100',
          'product_description' =&gt; 'required|max:1000',
          'tags' =&gt; 'required',
          'image_count'=&gt;'required|integer',
          'creation_mode'=&gt;'required|integer',
          'skus.is_shippable'=&gt;'in:y,n',
          'skus.actual_price'=&gt;'regex:/^\s*(?=.*[1-9])\d*(?:\.\d{1,2})?\s*$/',
          'skus.selling_price' =&gt; 'regex:/^\s*(?=.*[1-9])\d*(?:\.\d{1,2})?\s*$/',
          'skus.quantity_type' =&gt; 'sometimes|required|in:finite,infinite,bucket',
          'skus.quantity_total' =&gt; 'integer|required_if:skus.quantity_type,finite', 
          'skus.bucket_value'=&gt;'in:instock,soldout,limited|required_if:skus.quantity_type,bucket',
          'skus.sort_order'=&gt; 'required|integer'
          ],
          ValidatorInterface::RULE_UPDATE =&gt; [
          ]
      ];
  </code></pre>
  
  <p>The above request is properly getting validated. But The skus can have multiple entities inside like below request</p>
  
  <pre><code>{
         "categories_id" :"1",
         "product_name" : "Pen",
         "product_description" : "this is pen",
         "tags" : "pen,write",
         "image_count" : "4",
         "skus": 
            [{
                "is_shippable":"n",
                "actual_price":"100.55", 
                "selling_price":"200.45",
                "quantity_type":"bucket",
                "quantity_total":"10",
                "bucket_value":"instock",
                "sort_order":"1"
            },
            {
                "is_shippable":"n",
                "actual_price":"100.55", 
                "selling_price":"200.45",
                "quantity_type":"bucket",
                "quantity_total":"10",
                "bucket_value":"instock",
                "sort_order":"1"
            }]
      }
  </code></pre>
  
  <p>How do I validate if there are multiple nested entities?</p>