title: Yii min length validator allowing blank inputs
body: <p>I have the following code within a model</p>
  
  <pre><code>rules()
  {
  ....
  array('new_pass', 'length', 'min'=&gt;6, 'max'=&gt;64, 'tooShort'=&gt;'Password is too short (minimum is 6 characters)'),        
  ....    
  }
  </code></pre>
  
  <p>When I input a value that is between 1 and 5 chars long it errors saying it is too short. But if I leave it blank it updates? I'm not sure how to fix this or more importantly why it would let a blank value in.</p>
  
  <p>I tried adding in a allowEmpty, that stopped it updating a password that was 0 length in chars but when I tried to then save the model with a 6+ length password it then error'd saying Password too short'</p>
  
  <p>Any help greatly appreciated</p>
  
  <p>Jonny</p>