Skip to content

Commit 90832a6

Browse files
committed
Fix sending tv4 standard message with broadcasted backend validation errors.
1 parent 2bf932c commit 90832a6

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)