title: Laravel 5.1 Modify input before form request validation
body: <p>Is there a way to modify input fields inside a form request class before the validation takes place? </p>
  
  <p>I want to modify some input date fields as follows but it doesn't seem to work. </p>
  
  <p>When I set <code>$this-&gt;start_dt</code> input field to <code>2016-02-06 12:00:00</code> and <code>$this-&gt;end_dt</code> to <code>2016-02-06 13:00:00</code> I still get validation error "end_dt must be after start_dt". Which means the input request values aren't getting changed when you update <code>$this-&gt;start_dt</code> and <code>$this-&gt;end_dt</code> inside the <code>rules()</code> function.</p>
  
  <pre class="lang-php prettyprint-override"><code>public function rules()
  {
      if ($this-&gt;start_dt){
          $this-&gt;start_dt = Carbon::createFromFormat('d M Y H:i:s', $this-&gt;start_dt . ' ' . $this-&gt;start_hr . ':'. $this-&gt;start_min . ':00');
      }
  
      if ($this-&gt;end_dt){
          $this-&gt;end_dt = Carbon::createFromFormat('d M Y H:i:s', $this-&gt;end_dt . ' ' . $this-&gt;end_hr . ':'. $this-&gt;end_min . ':00');
      }
  
      return [
          'start_dt' =&gt; 'required|date|after:yesterday',
          'end_dt' =&gt; 'required|date|after:start_dt|before:' . Carbon::parse($this-&gt;start_dt)-&gt;addDays(30)            
      ];
  }
  </code></pre>
  
  <p><strong>Note:</strong> <code>start_dt</code> and <code>end_dt</code> are date picker fields and the <code>start_hr</code>, <code>start_min</code> are drop down fields. Hence I need to create a datetime by combining all the fields so that I can compare. </p>