I create JSFiddle for your problem.
View:
<div ng-controller="MyCtrl">
<input placeholder="Email" ng-model="email" ng-pattern="emailRegExp" ng-class="{ error: !email }" />
<h4 name="mailValidator" ng-show="!email">Invalid Email</h4>
<h4 name="checkBlacklist" ng-show="email && inBlackList">Email is not allowed</h4>
</div>
Controller:
function MyCtrl($scope) {
$scope.inBlackList = false;
//get from DB in your case
var bannedEmail = ['qwe@qwe.qwe','qwe1@qwe.qwe','qwe2@qwe.qwe']
$scope.emailRegExp = /^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/;
$scope.$watch('email', function(newValue) {
if(newValue){
if(bannedEmail.indexOf(newValue) > -1) {
$scope.inBlackList = true;
}
else {
$scope.inBlackList = false;
}
}
});
}