Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.
This repository was 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

@AdrianM

Description

@AdrianM

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions