Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

min/max validations not working if values are changed later

Tags:

i have requirement where min value of one field depends on the input given in another field.

<input type="number" name="minval" class="form-control" ng-model="user.minval" 
      ng-required="true">

this input is used to validate another field

<input type="number" name="inputval" class="form-control" ng-model="user.inputval" 
     ng-required="true" min="{{user.minval}}">

but this is not working as expected.. if i change the "minval" later the input does not get revalidated..

i have tried setting the initial value for min from JS as was suggested in some solution but thats also not helping...

PLUNKER LINK