title: scenario for validation rules in yii
body: <p>I was wandering is there any chance to use scenario for rules, </p>
  
  <p>in my model I have </p>
  
  <pre><code>public function rules()
  {
      return array(
          array('delivery, firstNameBilling, lastNameBilling, addressBilling, cityBilling, countryBilling,
              postBilling, telephoneBilling, mailBilling, firstNameDelivery, lastNameDelivery, addressDelivery,
              cityDelivery, countryDelivery, postDelivery, telephoneDelivery, mailDelivery', 'required'),
          array('active', 'numerical', 'integerOnly'=&gt;true),
      );
  }
  </code></pre>
  
  <p>and in my view I have something like this</p>
  
  <pre><code>    &lt;tr&gt;
          &lt;td&gt;
              &lt;p&gt;&lt;?php echo $form-&gt;label($model,'telephoneBilling'); ?&gt;&lt;span&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class="required"&gt;*&lt;/span&gt;&lt;/p&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;?php echo $form-&gt;textField($model,'telephoneBilling'); ?&gt;
              &lt;?php echo $form-&gt;error($model,'telephoneBilling'); ?&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
  &lt;/table&gt;
  
  &lt;p&gt;&lt;?php echo $form-&gt;checkBox($model,'active', array('class' =&gt; 'change')); ?&gt;
      Delivery information: Please check the box if your delivery address differs from your billing address and enter the
      required delivery address in the fields provided below.&lt;/p&gt;
  
      &lt;div id="deliveryFormWrapper" style="display: none"&gt;
      &lt;table class="cartReviewTable"&gt;
      &lt;tr&gt;
          &lt;td colspan="4"&gt;
              &lt;span class="blueTitle"&gt;&lt;?php echo CHtml::encode(Yii::t('app', 'Delivery Information ')); ?&gt;&lt;/span&gt;
          &lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;
              &lt;p&gt;&lt;?php echo $form-&gt;label($model,'firstNameDelivery'); ?&gt;&lt;span&gt;:&amp;nbsp;&lt;/span&gt;&lt;span class="required"&gt;*&lt;/span&gt;&lt;/p&gt;
          &lt;/td&gt;
          &lt;td&gt;
              &lt;?php echo $form-&gt;textField($model,'firstNameDelivery'); ?&gt;
              &lt;?php echo $form-&gt;error($model,'firstNameDelivery'); ?&gt;
          &lt;/td&gt;
  </code></pre>
  
  <p>This is just a part to give you a picture what i do, so when i click on checkbox i show this hidden div, and he has a rules for his fields (the first div contains Billing fields, and the hidden contains delivery fields.</p>
  
  <p>When i want to submit the form and the checkbox is not selected, i cant do it, because of required fields, so i was wandering
  Is there any chance to use scenario for that situation and how, i need a clue.</p>
  
  <p>Thanks, i hope you can understand my question.</p>