title: Validation in Yii2
body: <p>I want that my <strong>quantity</strong>[<em>field name</em>] must be <strong>zero(0</strong>) or <strong>positive</strong></p>
  
  <p>I define following rules in my model.</p>
  
  <pre><code>public function rules()
  {
      return [
          [['quantity'], 'integer', 'min' =&gt; 0],
          [['quantity'], 'integer', 'max' =&gt; 1000000],
  
      ];
  }
  </code></pre>
  
  <p>And it is <strong>working properly</strong>. And display error message  when i try to enter <em>negative value</em>  .</p>
  
  <blockquote>
    <p>But The <strong>Problem</strong> is it accept <strong>-0</strong> [ <strong>minus zero</strong> ]</p>
  </blockquote>
  
  <p>How to restrict user to do not enter <strong>-0</strong> ? </p>
  
  <p>Thanks</p>