title: Laravel - highlighting the confirmation field for an error
body: <p>I can't find a way to get Laravel to highlight the correct field when a _confirmation field is incorrect.</p>
  
  <p>Using a Bootstrap layout I've got an email and email_confirmation field in my form like this:</p>
  
  <pre><code>&lt;div class="control-group {{$errors-&gt;has('email') ? 'error' : ''}}"&gt;
      {{ Form::label('email', 'Email', array('class' =&gt; 'control-label'))}}
      &lt;div class="controls"&gt;
          {{ Form::email('email', Input::old('email'));}}
          {{ $errors-&gt;first('email', Form::block_help(':message')) }}
      &lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="control-group {{$errors-&gt;has('email_confirmation') ? 'error' : ''}}"&gt;
      {{ Form::label('email_confirmation', 'Confirm Email', array('class' =&gt; 'control-label'))}}
      &lt;div class="controls"&gt;
          {{ Form::email('email_confirmation', Input::old('email_confirmation'));}}
          {{ $errors-&gt;first('email_confirmation', Form::block_help(':message')) }}
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>So if the user puts in an invalid email address then the 'email' field will have an error attached to it and the correct label/field will be highlighted.</p>
  
  <p>But if the user has entered a valid/correct email address in the first field but gets the confirmation wrong - the error returned is still for the 'email' field, not the email_confirmed field.</p>
  
  <p>To me it looks weird when the email field is highlighted when the error is actually with the email_confirmation field.</p>
  
  <p>As far as I can understand from <a href="https://stackoverflow.com/questions/14455112/distinguish-between-validation-errors-in-laravel">this stackoverflow question</a>, I could probably do something like</p>
  
  <pre><code>{{$errors-&gt;first('email', ':message') == 'Please confirm your email address correctly.' ? 'error' : ''}}
  </code></pre>
  
  <p>This will work, but the problem is that I'm running a multi-lingual site so the :message that gets returned is going to be one of many possibilities.</p>
  
  <p>I guess I could write a function to compare the :message against an array of messages for each language but I thought I'd check if there was an easier way to go about it.</p>
  
  <p>Cheers!</p>