private function validateItems($items)
    {
        $rules = [];
        for ($cont = 1; $cont <= $this->itemsCount; $cont++) {
            $rules = array_merge($rules, [
              'itemId'.$cont          => 'required|max:100',
              'itemDescription'.$cont => 'required|max:100',
              'itemAmount'.$cont      => 'required|numeric|between:0.00,9999999.00',
              'itemQuantity'.$cont    => 'required|integer|between:1,999',
            ]);
        }

        $this->validate($items, $rules);
    }
private function validateItems($items)
    {
        $rules = [];
        for ($cont = 1; $cont <= $this->itemsCount; $cont++) {
            $rules = array_merge($rules, [
              'itemId'.$cont          => 'required|max:100',
              'itemDescription'.$cont => 'required|max:100',
              'itemAmount'.$cont      => 'required|numeric|between:0.00,9999999.00',
              'itemQuantity'.$cont    => 'required|integer|between:1,999',
            ]);
        }

        $this->validate($items, $rules);
    }
private function validateItems ( $ items ) { $ rules = [ ] ; for ( $ cont = 1 ; $ cont <= $ this -> itemsCount ; $ cont ++ ) { $ rules = array_merge ( $ rules , [ 'itemId' . $ cont => 'required|max:100' , 'itemDescription' . $ cont => 'required|max:100' , 'itemAmount' . $ cont => 'required|numeric|between:0.00,9999999.00' , 'itemQuantity' . $ cont => 'required|integer|between:1,999' , ] ) ; } $ this -> validate ( $ items , $ rules ) ; }
Valida os dados contidos na array de itens.

@param array $items
Valida os dados contidos na array de itens .