I have the following html:
<tbody>
<tr ng-repeat="item in itens">
<td width="75%">
{{ item.name }}
</td>
<td width="25%">
<input type="text"
class="form-control "
ng-model="item.value"
ui-money-mask="2"
ng-test'>
<span style="font-size: 10px;">From {{ item.val_min | currency:"R$ ":2 }} To {{ item.val_max | currency:"R$ ":2 }}</span>
</td>
</tr>
</tbody>
What i need is a Directive who validates the input; if the user types a value outside the range of item.val_min and item.val_max, the input show a invalid message.
How can i get item.val_min and item.val_max values inside my directive, and how to set the input as invalid during the user typing?
<input type="number" />, you can use ng-min / ng-max directives - DerekMT12