AngularJS A form and its current validation status




AngularJS A form and its current validation status

<!DOCTYPE html>
<html>
   <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.9/angular.min.js">
   </script>
   <body>
      <form ng-app="" name="myForm" ng-init="myText = 'post@tutorialsroot.com'">
         Email:
         <input type="email" name="myAddress" ng-model="myText" required>
         <p>Edit the e-mail address, and try to change the status.</p>
         <h1>Status</h1>
         <p>Valid: {{myForm.myAddress.$valid}} (if true the value meets all criteria).
         </p>
         <p>Dirty: {{myForm.myAddress.$dirty}} (if true the value has been changed).
         </p>
         <p>Touched: {{myForm.myAddress.$touched}} if true the field has been in focus
         </p>
      </form>
   </body>
</html>

Output