Skip to content
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.

valdrMessage not working correctly with multiple inputs for same model field #95

Open
AdrianM opened this issue Nov 3, 2015 · 1 comment

Comments

@AdrianM
Copy link

AdrianM commented Nov 3, 2015

The given example iterate over some zone objects with the required field "code". Valdr validates each field and adds ng-valid/ng-invalid correctly. But valdrMessage show the error message only if the second field is invalid (and in this situation for both input fields).

<form name="validationErrorForm" ng-controller="ValidationForm as validationForm" novalidate>
  <div class="input-wrap" ng-repeat="zone in validationForm.codes">
    <div valdr-type="NewZoneTo" valdr-form-group>
      <label class="control-label">Code</label>
      <input type="text" placeholder="Code" ng-model="zone.code" name="code" class="form-control">
    </div>
  </div>
</form>

ValdrMessage resolves the field by name and not by id which could be the origin of the problem. Is there a solution for this?

@ldoblies
Copy link

+1, any update on this?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants