title: Input required only if specific option is selected
body: <p>I have a form that contains a <code>select</code> and an <code>input</code> field. To simplify the example, let's say the three options of the <code>select</code> are <code>1</code>, <code>2</code>, and <code>3</code>.</p>
  
  <p>I need to create a set of validation rules where <code>input</code> is only <code>required</code> if option <code>2</code> is selected. How can I create this rule?</p>
  
  <p>Here is my set of rules so far:</p>
  
  <pre><code>$rules = array(
      'selectField' =&gt; 'required',
      'inputField' =&gt; '', // only required if option 2 is selected
  );
  </code></pre>