Skip to content

Commit 672c047

Browse files
committed
Merge pull request #315 from mqamhieh/fix-backend-validation-messages
Fix sending tv4 standard message with broadcasted backend validation err...
2 parents 688b63a + 90832a6 commit 672c047

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/services/decorators.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,11 @@ angular.module('schemaForm').provider('schemaFormDecorators',
250250

251251
scope.ngModel.$setValidity(error, validity === true);
252252

253-
// Setting or removing a validity can change the field to believe its valid
254-
// but its not. So lets trigger its validation as well.
255-
scope.$broadcast('schemaFormValidate');
253+
if (validity === true) {
254+
// Setting or removing a validity can change the field to believe its valid
255+
// but its not. So lets trigger its validation as well.
256+
scope.$broadcast('schemaFormValidate');
257+
}
256258
}
257259
})
258260
}

0 commit comments

Comments
 (0)