title: Date validation in angularJS MM/DD/YYYY format
body: <blockquote>
    <p>I Need a custom directive/other way, which validate the date format (MM/DD/YYYY). Please help.</p>
  </blockquote>
  
  <pre><code>    &lt;body ng-app="dateInputExample"&gt;
      &lt;script&gt;
         angular.module('dateInputExample', [])
           .controller('DateController', ['$scope', function($scope) {
  
           }]);
      &lt;/script&gt;
      &lt;form name="myForm" ng-controller="DateController as dateCtrl"&gt;
         &lt;label for="exampleInput"&gt;Enter Date:&lt;/label&gt;
         &lt;input type="date" id="exampleInput" name="input" ng-model="example.value" required /&gt;
         &lt;div role="alert"&gt;
           &lt;!-- for error display --&gt;
           &lt;span class="error" ng-show="myForm.input.$error.required"&gt;
               Required!&lt;/span&gt;
           &lt;span class="error" ng-show="myForm.input.$error.date"&gt;
               Not a valid date!&lt;/span&gt;
          &lt;/div&gt;
      &lt;/form&gt;
      &lt;/body&gt;
  </code></pre>
  
  <p><a href="https://plnkr.co/edit/Pi466O9rDxSjrfup0GMl?p=preview" rel="nofollow noreferrer">Plunker Link</a></p>