Is there a way to validate an input field against a list of strings in an array without using custom directives or patterns?
For example, if the array contains town, city, and house, then typing any of those words should result in a validation failure. Anything else should pass.
<input type="text" ng-not-in="r.arr" ...
r.arr = ["town", "city", "house"]
I know about using $watch, creating custom directives, or ng-pattern, but is there a built-in solution for this particular case? If not, which method would be the cleanest approach?
Thank you