title: Validate a value cannot less than 0
body: <p>i have this form on Yii2</p>
  
  <pre><code>Employee Name   : N1
  Apply Date      : 2016-08-26
  Start Date      : 2016-08-29
  Days Leave      : 4 Days
  Days Leave Left : 8
  Status          : Pending
  </code></pre>
  
  <p>The result i expected is,when i input 9 days on Days Leave,the form will validate</p>
  
  <pre><code>"Maximum Quota is Exceeded,Cannot Input"
  </code></pre>
  
  <p>here is my Models to get Days Leave Left</p>
  
  <pre><code>  public function daysleaveleft($id,$year) {
          $models = Leave::find()-&gt;select(['daysleave'=&gt;'sum(daysleave)'])-&gt;where(['EmpId' =&gt; $id,'year(startdate)'=&gt;$year])-&gt;One();
  
          $setting = Setting::find()-&gt;where(['Var'=&gt;'MaxLeave'])-&gt;One();
          return $Setting-&gt;Val - $models['daysleave'];            
      }
  </code></pre>
  
  <p><strong>Edited</strong></p>
  
  <pre><code>Days Leave | Days Leave Left
      0      |       12
      4      |       8
      3      |       5
      6      |      -1
  </code></pre>
  
  <p>i'm expecting the result will be like this,when user input 6,when he has 5 quota left,the form will validate.</p>