import _ from 'lodash';

function notInArray() {
    return {
        require: 'ngModel',
        scope: {
            notInArray: '='
        },
        link: function(scope, elm, attrs, ctrl) {
            ctrl.$validators.notInArray = function(modelValue) {
                return !_.contains(scope.notInArray, modelValue);
            };
        }
    };
}
notInArray.$inject = [];

export default notInArray;

@@ -127,17 +127,60 @@
 ray: '='
+,%0A            notInArrayCaseSensitive: '=?'
 %0A
-
         
@@ -293,24 +293,81 @@
 delValue) %7B%0A
+                if (scope.notInArrayCaseSensitive) %7B%0A    
             
@@ -420,16 +420,176 @@
 Value);%0A
+                %7D%0A%0A                let check = modelValue.toLowerCase();%0A                return !_.any(scope.notInArray, item =%3E item.toLowerCase() === check);%0A
         

add support for flagging as case insensitive