yForm&quot;&gt;
  &lt;label&gt;
    Email address
    &lt;input type=&quot;email&quot;
           name=&quot;myEmail&quot;
           ng-model=&quot;email&quot;
           minlength=&quot;5&quot;
           required /&gt;
  &lt;/label&gt;
  &lt;div ng-messages=&quot;myForm.myEmail.$error&quot; role=&quot;alert&quot;&gt;
    &lt;div ng-message=&quot;required&quot;&gt;You did not enter your email address&lt;/div&gt;
    &lt;div ng-repeat=&quot;errorMessage in errorMessages&quot;&gt;
      &lt;!-- use ng-messa