title: Laravel Form Request validation not working with getValidatorInstance()
body: <p>I've a simple array of rules in rules function: </p>
  
  <pre><code>return [
      'anumber'  =&gt; 'required|numeric'
  ];
  </code></pre>
  
  <p>And I fill this in getValidatorInstance method this way:</p>
  
  <pre><code>request()-&gt;merge(['anumber' =&gt; IdsCompany::getNumDBempty()]);
  </code></pre>
  
  <p><code>getNumDBempty()</code> is working as expected, and returns an <code>int</code> or <code>false</code>, I want the validator to only accept the request if the function returns a number.</p>
  
  <p>Controller method:</p>
  
  <pre><code>public function store(StoreIdsCompanyRequest $request, IdsCompany $ids_company_reg)
  {
  
      //$ids_company_reg =  new IdsCompany;       
  
      $data   = request()-&gt;all();
  
      $user = User::find(auth()-&gt;id());
  
      $numEmpresasAsesor = DB::table('accesses')
          -&gt;where('userId', '=', auth()-&gt;id())
          -&gt;distinct('companyId')-&gt;count();
  
      if ($numEmpresasAsesor &lt; ($user-&gt;consultant-&gt;asesorLimiteEmpresas))
      {
          if($ids_company_reg-&gt;createCompany_ForConsultant($data,$user-&gt;id))
          {           
              return redirect()-&gt;route('consultants.companies.index')-&gt;with('success',trans('textos.SACC_registro_guardado'));
          }
          else
          {                   
              return redirect()-&gt;route('consultants.companies.create')-&gt;withInput()-&gt;withErrors($ids_company_reg-&gt;errors);
          }
  
      }
      else
      {   
          $ids_company_reg-&gt;errors = new IlluminateMessageBag;
          $ids_company_reg-&gt;errors-&gt;add('error', trans('textos.CCF_numero_empresas')); 
          return redirect()-&gt;route('consultants.companies.create')-&gt;withInput()-&gt;withErrors($ids_company_reg-&gt;errors);
      }
  }
  </code></pre>
  
  <p>The thing is that <code>anumber</code> is merged with the request but it keeps telling me that <code>anumber</code> is compulsory.</p>
  
  <p>I've been fighting and searching for a couple of days, and I didn't find any clue of why the validator won't work on variables merged in <code>getValidatorInstance()</code>. (I've tried to validate this in others <code>FormRequest</code> and the result is the same, they ignore it like the variable was never there, but the request has it inside.)</p>
  
  <p>Working in Laravel 5.5 atm, and planning to upgrade 5.6 when my form request are done and working.</p>