Bugfix: #10414 - Validation message doesn't disappear once the issue is fixed (#10581)

* Add missing focus styling

* Fix issue where validation message does not disappear when all chars are removed

Co-authored-by: BatJan <jaskov@gmail.com>
Co-authored-by: Jan Skovgaard Olsen <jso@co3.dk>
This commit is contained in:
Jan Skovgaard
2021-07-13 09:57:20 +02:00
committed by GitHub
parent a1e0af6fff
commit 87a7e84cba
2 changed files with 5 additions and 1 deletions

View File

@@ -31,6 +31,10 @@ function textboxController($scope, validationMessageService) {
checkLengthVadility();
$scope.nearMaxLimit = $scope.validLength && $scope.charsCount > Math.max($scope.maxChars*.8, $scope.maxChars-25);
}
else {
$scope.charsCount = 0;
checkLengthVadility();
}
}
$scope.model.onValueChanged = $scope.change;
$scope.change();

View File

@@ -10,7 +10,7 @@
aria-required="{{model.validation.mandatory}}"
aria-invalid="False"
ng-trim="false"
ng-keyup="change()" />
ng-change="change()" />
<div ng-messages="textboxFieldForm.textbox.$error" show-validation-on-submit>
<p class="sr-only" ng-message="valServer" tabindex="0">{{model.label}} {{textboxFieldForm.textbox.errorMsg}}</p>