I am trying to do a validation so that the value of my input type="number" seje > = 1. But I tried several things and none worked. I'm now trying to use ng-pattern. But there's a gap. If I type 0 it invalidates, but if I type 01 it validates!
<div ng-if="validaQtdPromotores(cadastro.cargo)" ng-class="{ 'has-error' : formCadastro.qtdPormotores.$invalid && !formCadastro.qtdPormotores.$pristine }">
<input type="number" name="qtdPormotores" ng-model="cadastro.qtdPormotores" ng-pattern="/[1-9]/" placeholder="Quantos promotores coordena?" required />
<p ng-show="formCadastro.qtdPormotores.$invalid && !formCadastro.qtdPormotores.$pristine">Entre com um número válido.</p>
</div>