{"action":"created","issue":{"url":"https://api.github.com/repos/angular/angular.js/issues/13611","labels_url":"https://api.github.com/repos/angular/angular.js/issues/13611/labels{/name}","comments_url":"https://api.github.com/repos/angular/angular.js/issues/13611/comments","events_url":"https://api.github.com/repos/angular/angular.js/issues/13611/events","html_url":"https://github.com/angular/angular.js/issues/13611","id":123461289,"number":13611,"title":"Validate a dynamic form and Show ngMessages with ngRepeat and dynamic names","user":{"login":"nazanine","id":1814600,"avatar_url":"https://avatars.githubusercontent.com/u/1814600?v=3","gravatar_id":"","url":"https://api.github.com/users/nazanine","html_url":"https://github.com/nazanine","followers_url":"https://api.github.com/users/nazanine/followers","following_url":"https://api.github.com/users/nazanine/following{/other_user}","gists_url":"https://api.github.com/users/nazanine/gists{/gist_id}","starred_url":"https://api.github.com/users/nazanine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nazanine/subscriptions","organizations_url":"https://api.github.com/users/nazanine/orgs","repos_url":"https://api.github.com/users/nazanine/repos","events_url":"https://api.github.com/users/nazanine/events{/privacy}","received_events_url":"https://api.github.com/users/nazanine/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-22T11:11:33Z","updated_at":"2015-12-23T13:35:07Z","closed_at":"2015-12-23T13:35:07Z","body":"I have a form with a email field and a button a button which creates a new email fields with a dynamic name.\r\n\r\nso i used a ngRepeat with a dynamic name:\r\n```javascript\r\n\r\n<div class=\"emailReceiverContent\" ng-repeat=\"i in getNb()\" > \r\n<input class=\"textInput\" \r\n       ng-init=\"fieldName = 'mailReciever' + i\"\r\n       name=\"{{fieldName}}\"\r\n       ng-model=\"requestedInfos.mailReceivers[i]\"\r\n       type=\"email\"\r\n       required />\r\n\r\n<div class=\"errorMessage\" ng-messages=\"emailForm[fieldName].$error\"          \r\n       role=\"alert\" ng-show=\"submitted\">\r\n       <div ng-messages-include=\"error-messages\"></div>\r\n</div>\r\n\r\n\r\n <p class=\"help-block\" ng-show=\"emailForm['mailReciever'+[i]].$invalid\">\r\n       Valid Email Address Required<br/>\r\n       {{emailForm['mailReciever'+[i]].$error}}\r\n </p>\r\n\r\n```\r\n\r\n... Each time the current field shows the error messages, when i create the second , the first one is not changing anymore.\r\n\r\nwhen i submit my form it should show the error message and i have only the errors for the last field.\r\n\r\nHow it is possible to get the errors for each field separately?\r\n"},"comment":{"url":"https://api.github.com/repos/angular/angular.js/issues/comments/166897570","html_url":"https://github.com/angular/angular.js/issues/13611#issuecomment-166897570","issue_url":"https://api.github.com/repos/angular/angular.js/issues/13611","id":166897570,"user":{"login":"Narretz","id":1153097,"avatar_url":"https://avatars.githubusercontent.com/u/1153097?v=3","gravatar_id":"","url":"https://api.github.com/users/Narretz","html_url":"https://github.com/Narretz","followers_url":"https://api.github.com/users/Narretz/followers","following_url":"https://api.github.com/users/Narretz/following{/other_user}","gists_url":"https://api.github.com/users/Narretz/gists{/gist_id}","starred_url":"https://api.github.com/users/Narretz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Narretz/subscriptions","organizations_url":"https://api.github.com/users/Narretz/orgs","repos_url":"https://api.github.com/users/Narretz/repos","events_url":"https://api.github.com/users/Narretz/events{/privacy}","received_events_url":"https://api.github.com/users/Narretz/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T13:35:07Z","updated_at":"2015-12-23T13:35:07Z","body":"Please ask support questions on one of these channels: https://github.com/angular/angular.js/blob/master/CONTRIBUTING.md#question If you think you've found a bug, please open an issue with demo and instructions to reproduce. Thanks!"}}