title: Angular ng-messages: how to check password confirmation?
body: <p><strong>THE SITUATION:</strong></p>
  
  <p>I am using <a href="https://docs.angularjs.org/api/ngMessages/directive/ngMessages">ng-messages</a> directive for instant validation in my angular app. Everything is working fine except one thing: i need to validate the field 'password confirmation' and don't know how to do.</p>
  
  <p><strong>THE CODE:</strong></p>
  
  <pre><code>&lt;form name="autentication_form" novalidate="" ng-submit="submit_register()"&gt;
  
      &lt;label class="item item-input"&gt;
          &lt;span class="input-label"&gt;Email&lt;/span&gt;
          &lt;input type="text" name="email" ng-model="registerData.email" required&gt;
  
          &lt;div class="form-errors" ng-messages="autentication_form.email.$error" role="alert" ng-if='autentication_form.email.$dirty'&gt;
              &lt;div class="form-error" ng-message="required"&gt;You did not enter the email&lt;/div&gt;
          &lt;/div&gt;
      &lt;/label&gt;
  
      &lt;label class="item item-input"&gt;
          &lt;span class="input-label"&gt;Password&lt;/span&gt;
          &lt;input type="password" name="password" ng-model="registerData.password" required&gt;
  
          &lt;div class="form-errors" ng-messages="autentication_form.password.$error" role="alert" ng-if='autentication_form.password.$dirty'&gt;
              &lt;div class="form-error" ng-message="required"&gt;Please enter the password&lt;/div&gt;
          &lt;/div&gt;
      &lt;/label&gt;
  
      &lt;label class="item item-input"&gt;
          &lt;span class="input-label"&gt;Password confirmation&lt;/span&gt;
          &lt;input type="password" name="password_confirmation" ng-model="registerData.password_confirmation" required&gt;
  
          &lt;div class="form-errors" ng-messages="autentication_form.password_confirmation.$error" role="alert" ng-if='autentication_form.password_confirmation.$dirty'&gt;
              &lt;div class="form-error" ng-message="required"&gt;Password confirmation required&lt;/div&gt;
          &lt;/div&gt;
      &lt;/label&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>THE QUESTION:</strong></p>
  
  <p>How can i check that the password confirmation match using ng-messages?</p>