title: Validate email AngularJS in Controller
body: <p>I have a list of inputs where the use can type in emails, and in these inputs I want to allow invaild inputs so on the input tag I have <code>ng-model-options="{allowInvalid: true}"</code> and then when the user is done typing in all there emails, they hit a submit button which calls my function <code>enter()</code> in the controller.</p>
  
  <p>In the HTML I have set each email input with <code>ng-model="item.text"</code> so then in the controller I can loop through my emails. This is where I want to check if they are valid or not. How can I do this?</p>
  
  <p>I saw on <a href="https://docs.angularjs.org/api/ng/input/input%5Bemail%5D" rel="nofollow">https://docs.angularjs.org/api/ng/input/input%5Bemail%5D</a> the <code>myForm.input.$valid</code> is used so I got all the input elements and tried <code>inputEle.$valid</code> but this always comes back as <code>undefined</code>.</p>
  
  <p>So in my loop I have access to both the raw text the user put in such as:</p>
  
  <pre><code>test@@email..com
  vaild@email.com
  </code></pre>
  
  <p>And I have access to the input element like</p>
  
  <pre><code>&lt;input type="email" placeholder="Email" ng-model="item.text" ng-model-options="{allowInvalid: true}" class="ng-not-empty ng-dirty ng-invalid ng-invalid-email ng-invalid-remove ng-valid-email-add ng-invalid-email-remove ng-touched" style=""&gt;
  </code></pre>
  
  <p>So how in that loop in my controller can I validate the email?</p>
  
  <p>Thanks</p>