title: Apply a particular validation rule on a specific input, only if another input is also present and set to a specific value
body: <p>To put it simply, what I want to do is to check if the value of a particular input <code>exists</code> in the database, but I want the <code>exists</code> rule to be applied only if another input is also present with a specific value.</p>
  
  <p>For example, let’s say I have a form with a select named <code>type</code> and a text field named <code>id</code>.</p>
  
  <pre><code>&lt;select name="type"&gt;
      &lt;option value="0"&gt;Type0&lt;/option&gt;
      &lt;option value="1"&gt;Type1&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;input type="text" name="id"&gt;
  </code></pre>
  
  <p>If the <code>type</code> is present and equals to <code>1</code> I want to check if the <code>id</code> input <code>exists</code> in the database table <code>users</code>, otherwise the <code>exists</code> rule to not be applied at all, while the rest of the validation rule to be applied as normal.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>Preferably, I'd like to use a form request for doing the validation. Can that be achieved using a form request?</p>