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\
I know this is quite an old question, but for what it's worth, the angular docs describe ng-required which takes a boolean value. This solved a similar problem I was having.