title: In AngularJS how to display a green tick mark in front of input field upon entering valid data in it?
body: <p>I'm using AngularJS and Angular Material in my web application. </p>
  
  <p>I'm a total newbie to this AngularJS and Angular Material thing.</p>
  
  <p>Now I have to show a green tick mark in front of input field only upon entering valid input data in it. </p>
  
  <p>How should I achieve this?</p>
  
  <p>Sample password field code is as below:</p>
  
  <pre class="lang-html prettyprint-override"><code>&lt;md-input-container class="md-block" flex&gt; 
      &lt;label&gt;Current Password&lt;/label&gt; 
      &lt;md-icon md-svg-src="/images/icons/ic_lock_black_24px.svg"&gt;&lt;/md-icon&gt;
      &lt;input type="password" ng-model="changePassword.currentPassword" required name="curPass" minlength="6"&gt;
      &lt;div ng-messages="chnagePasswordForm.curPass.$error"&gt;
          &lt;div ng-message="required"&gt;Please enter valid password&lt;/div&gt;
          &lt;div ng-message="minlength"&gt;Password should be of eight or more characters&lt;/div&gt;
      &lt;/div&gt;
      &lt;md-button ng-disabled="chnagePasswordForm.$invalid" class="md-raised md-primary enrolBtn" ng-click="changePassword()"&gt;Save&lt;/md-button&gt;
  &lt;/md-input-container&gt;
  </code></pre>
  
  <p>I have to display green colored tick mark in front of this password field only upon entering the valid password.</p>
  
  <p>Thanks.</p>