Skip to content

Commit

Permalink
Validation hint fix (#1386)
Browse files Browse the repository at this point in the history
* Update validation-hint.component.ts

* fix
  • Loading branch information
litvinets authored Jun 27, 2022
1 parent ad68add commit 40cd61c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<small appValidationMessageStyling>
<ng-container *ngIf = "invalid">
<ng-container *ngIf = "required; then requiredInputTmpl"></ng-container>
<small *ngIf = "invalid" appValidationMessageStyling>
<ng-container *ngIf = "required; then requiredInputTmpl"></ng-container>
<ng-container *ngIf = "!required">
<ng-container *ngIf = "invalidCharacters; then invalidCharactersTmpl"></ng-container>
<ng-container *ngIf = "invalidSymbols; then invalidSymbolsTmpl"></ng-container>
<ng-container *ngIf = "invalidFieldLength; then invalidLengthTmpl"></ng-container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export class ValidationHintComponent implements OnInit, OnDestroy, OnChanges {

private checkValidationErrors(errors: ValidationErrors): void {
this.invalidEmail = !!errors?.email;
this.invalidFieldLength = !!(errors?.maxlength && errors?.minlength);
this.invalidFieldLength = !!(errors?.maxlength || errors?.minlength);
this.invalidPhoneLength = !!errors?.minlength && !errors?.maxlength;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@import "src/app/shared/styles/create-form-wrapper.scss";
@import "src/app/shared/styles/create-form.scss";
@import "src/app/shared/styles/buttons.scss";

@import "src/app/shared/styles/validation-form.scss";

::ng-deep .dropdown-panel.create-admin{
max-height: 216px;
Expand Down

0 comments on commit 40cd61c

Please sign in to comment.