title: How to validate several rules with 'required_if' on Laravel 5.5?
body: <p>I am trying to validate the 'uuid' field so that it is mandatory if the 'typeUUID' field is marked 'type1'.</p>
  
  <pre><code>$validator = Validator::make($request-&gt;all(), [
      'uuid' =&gt; 'required_if:typeUUID,==,type1|alpha_dash|size:36',
  ]);
  </code></pre>
  
  <p>If I select the value 'type1' it indicates that the field is mandatory, and when I set another value that is not mandatory, it validates' alpha_dash 'and' size: 36 and does not accept the field since it is sent empty.</p>
  
  <p>What is the right way?</p>
  
  <p>I know I could do it with a condition by checking the type at the beginning and then applying one or more rules. But I would like to know the correct way to do it.</p>