title: Laravel 5: Check for Specific Error
body: <p>I have Password and Confirm Password inputs. I have coded these inputs so that in the event of an error the inputs highlight, like so:</p>
  
  <pre><code>&lt;div class="form-group {{ $errors-&gt;has('password') ? 'has-error' : '' }}&gt;
      &lt;label&gt;Password&lt;/label&gt;
      &lt;input type="password" name="password" class="form-control"&gt;
  &lt;/div&gt;
  
  &lt;div class="form-group {{ $errors-&gt;has('password_confirmation') ? 'has-error' : '' }}&gt;
      &lt;label&gt;Password&lt;/label&gt;
      &lt;input type="password" name="password_confirmation" class="form-control"&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>In my Controller, I validate these inputs as follows:</p>
  
  <pre><code>$this-&gt;validate($request, [
      ....
      'password'                 =&gt; 'required|min:8|confirmed',
      'password_confirmation'    =&gt; 'required',
      ....
  ]);
  </code></pre>
  
  <p>When either input is null and/or less than 8 characters, the inputs highlight as expected. However, when the inputs don't match, I would logically expect the Confirm Password input to highlight. However, it is the Password field that highlights, because that is the input that the "confirmed" rule is set to.</p>
  
  <p>The "$errors->has()" method simply checks if an error exists for an input. Is there a way to check if an input has a <em>specific</em> kind of error?</p>