title: How to disable the button only if have an input field error
body: <pre><code>&lt;td&gt;
    &lt;div&gt;
      &lt;ng-form name="mrpForm"&gt;
          &lt;input type="number" min="1" name="mrp" step="any" ng-model="sku.mrp" style="width:80px;" / required&gt;
          &lt;span style="color:red;" ng-if="(mrpForm.mrp.$error.min)"&gt;Must be greater than zero&lt;/span&gt;
      &lt;/ng-form&gt;
    &lt;/div&gt;
  &lt;/td&gt;
  &lt;td&gt;
    &lt;ng-form name="packQtyform"&gt;
      &lt;input type="number" name="skupackQty" min="2" max="100" ng-model="sku.packQty" style="width:100px;" /&gt;
      &lt;span style="color:red;" ng-if="(packQtyform.skupackQty.$error.min)"&gt;Must be greater than 1&lt;/span&gt;
      &lt;span style="color:red;" ng-if="(packQtyform.skupackQty.$error.max)"&gt;Maximum 100&lt;/span&gt;
    &lt;/ng-form&gt;
  &lt;/td&gt;
  &lt;td&gt;
    &lt;button class="col-md-12 col-sm-12 col-xs-12 btn btn-sm blue" ng-disable="!sku.mrp"
  ng-click="addsku(sku);&gt;Save&lt;/button&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>In the above code, I want to make save button disable only if a sku.packQty value is an error and if sku.mrp empty,sku.packQty can be empty but it should not be an error If error message save button must be disabled.</p>