min="{{selections.createDaily?'0': '1'}}"UPDATE 2. Better solution is to use ng-if suggested in stackoverflow.
<input type="number" name="maxSale" ng-show="!selections.createDaily" id="maxSale" ng-model="currentmax4sale.maxSale" class="form-control" min="1" required data-sm:number data-sm:number-format data-sm:focus data-accuracy="0" /> <div class="field-validation-error"> <span ng-show="form.editMax4saleGeneralForm.maxSale.$error.required && form.editMax4saleGeneralForm.maxSale.$dirty">@String.Format(Messages.isRequired, Labels.limit)</span> <span ng-show="(form.editMax4saleGeneralForm.maxSale.$error.min ) && form.editMax4saleGeneralForm.maxSale.$dirty"> @String.Format(Messages.mustBeGreaterThanOrEqualTo, Labels.limit, "1") </span> </div>So, my selections.createDaily = true and the control is not shown. However, the min validation is still firing and causing the form to become $invalid. What should I do to make sure that min validation is only firing when control is visible?