title: How to add validation attributes in an angularjs directive
body: <p>I am trying to write an angular directive that adds validation attributes to the tag, but it doesn't seem to be working.  Here is my demo.  You will notice that "Is Valid" remains true if you delete the text in the second input box, but goes to false if you delete the text in the first input box.</p>
  
  <p><a href="http://plnkr.co/edit/Rr81dGOd2Zvio1cLYW8D?p=preview">http://plnkr.co/edit/Rr81dGOd2Zvio1cLYW8D?p=preview</a></p>
  
  <p>Here is my directive:</p>
  
  <pre><code>angular.module('demo', [])
  .directive('metaValidate', function () {
      return {
          restrict: 'A',
          link: function (scope, element, attrs) {
              element.attr("required", true);
          }
      };
  });
  </code></pre>
  
  <p>I'm guessing I am just missing something simple.</p>