title: AngularJS and Bootstrap: Red border on invalid input field on submit
body: <p>I've this basic form implemented using AngularJS and Bootstrap:
  <a href="http://jsfiddle.net/dennismadsen/0stwd03k/" rel="noreferrer">http://jsfiddle.net/dennismadsen/0stwd03k/</a></p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div ng-controller="MyCtrl"&gt;
      &lt;form class="well" name="formTest" ng-submit="save()"&gt;
          &lt;div class="form-group"&gt;
              &lt;label for="name"&gt;Name*&lt;/label&gt;
              &lt;input type="name" class="form-control" id="name" placeholder="Enter name" required /&gt;
          &lt;/div&gt;
          &lt;button type="submit" class="btn btn-default"&gt;Submit&lt;/button&gt;
      &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>JavaScript</strong></p>
  
  <pre><code>var myApp = angular.module('myApp', []);
  
  function MyCtrl($scope) {
  
      $scope.save = function () {
      };
  }
  </code></pre>
  
  <p><strong>Result</strong></p>
  
  <p><img src="https://i.stack.imgur.com/37lrm.png" alt="enter image description here"></p>
  
  <p>The Name input field is required. When I click the submit button, I need the input field to have a red border if it's invalid. How can this be done?</p>
  
  <p>Alternatively, if I unfocus the input field and it's still not valid, it would be great that the red corder is shown on that time, instead of waiting for the form submit.</p>