title: required rule not working in model for yii2basic
body: <p>i have generated a model by gii for my table which by default generated required rule for some database field in rules section. But i don't want some of the fields of them to be required so i simply removed them from required portion. but this is not working.
  what i have by default is this </p>
  
  <pre><code>[['grp_name', 'sub_grp', 'member_name',  'fathers_name', 'd_o_b', 'occupation', , 'address', 'phone_no', 'nomniee_one',  'per_allotment_one',  'per_allotment_two' ], 'required'],
  </code></pre>
  
  <p>but i don't want to make <code>'per_allotment_two'</code> required so iremoved it and made this</p>
  
  <pre><code>  [['grp_name', 'sub_grp', 'member_name',  'fathers_name', 'd_o_b', 'occupation', , 'address', 'phone_no', 'nomniee_one',  'per_allotment_one' ], 'required'],
  </code></pre>
  
  <p>but got this error
  <a href="https://i.stack.imgur.com/CsVy5.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CsVy5.jpg" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/0CpDx.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0CpDx.jpg" alt="enter image description here"></a>
  <a href="https://i.stack.imgur.com/fTZmt.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fTZmt.jpg" alt="enter image description here"></a></p>