fix(selector): the required attribute should properly work with ng-required
Port of ng-attr-foo from angular-js