I have a custom directive which does validation, based on the directive attribute value.
e.g.: <input type="text" ng-my-validate="onlyletters" />
I want to change the onlyletters value to onlynumbers on the fly and want to the directive change it's validation behaviour because of that.
How can I achieve this?
patternor AngularJS'sng-pattern?