You can use indexOf and $watch. Watch the ng-model value for change and check if that value already exists in the array, if so throw error.
HTML
<input type="text" ng-model="set.val"/>
<span ng-show="message"> Please enter a different value </span>
JS
$scope.set = {
values: []
}; //array that contains previous ng-model values
$scope.message = false;
$scope.$watch('set.val', function(val) {
if (val != undefined) var index = $scope.set.values.indexOf(val);
if (index > -1) $scope.message = true;
else {
$scope.message = false;
$scope.set.values.push(val);
//add new input logic
}
})
Update
If you want the check to happen after clicking a add button(which I assume is present in your UI)
$scope.set = {
values: [] //array that contains previous ng-model values
};
$scope.add = function() {
var index = $scope.set.values.indexOf($scope.set.val);
if (index > -1) $scope.message = true;
else {
$scope.message = false;
$scope.set.values.push($scope.set.val);
//add new input logic
}
}