Limit number of values inputted depending on the value from a certain field

84 Views Asked by At

I have 3 fields, n, x, and y.

n will set the maximum number of values that can be input in x and y fields.

I tried using maxlength = {{n}} in x and y fields, it works but I want to exclude spaces and special characters and include only integers in counting the length.

<label class="item item-input">
     <span class="input-label">
         <b><font color="red"><b>*</b></font>x :</b>
     </span>
     <input type="tel" name="n" inputmode="numeric" required=""></input>
</label>
<label class="item item-input">
     <span class="input-label">
         <b><font color="red"><b>*</b></font>x :</b>
     </span>
     <input type="tel" name="x" ng-model="x" inputmode="numeric" required=""></input>
</label>
<label class="item item-input">
     <span class="input-label">
         <b><font color="red"><b>*</b></font>x :</b>
     </span>
     <input type="tel" name="y" ng-model="y" inputmode="numeric" required=""></input>
</label>
0

There are 0 best solutions below