I hope my question is clear, what i want to do is validating a decimal with 2 numbers max in the entry part and 2 numbers max in the decimal part (example 99,99) and i want it to accept 100 as max.
I can't use type="number" with min and max because Internet Explorer dose not accept comma in this type which i want to use, so here is my code:
<input type="text" class="form-control" name="fiscal" id="fiscal"
ng-model="vm.peticion.aportacion.benif_fiscal" ng-maxlength="5" placeholder="Escribir cantidad ..."
ng-style="(form.fiscal.$invalid) && ( form.fiscal.$touched || submitted) && {'background-color':'pink'}"
ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/"/>
<span ng-style="{'color':'red','font-size':'12px'}" ng-show="form.fiscal.$error.pattern && ( form.fiscal.$touched || submitted)">
Beneficio fiscal not valid!
</span>
what i'm looking for is the right pattern to do that, this one allows more than 100.
I want the acceptable values to be : from 00,00 to 99,99 and 100 using (,) or (.) and it should accept numbers without decimal part like 22
Thank youuuu !
Try using this,