Skip to content

Commit

Permalink
fix: improve request editor input validation error display
Browse files Browse the repository at this point in the history
closes #21
  • Loading branch information
toedter committed Feb 21, 2021
1 parent 2694846 commit 91b82e0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/request/request.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,10 @@ <h5 class="modal-title">HTTP Request Input</h5>
name="{{item.name}}" id="request-input-{{item.name}}" #ngModel="ngModel"
type="{{item.type}}"
placeholder="{{item.placeholder}}"
[appHalFormsProperty]="item" [title]="getValidationErrors(ngModel)"
[appHalFormsProperty]="item"
(change)="halFormsPropertyChanged()"
(keyup)="halFormsPropertyChanged()">
<div class="error-text">{{getValidationErrors(ngModel)}}</div>
</div>
</div>
<hr>
Expand Down
4 changes: 4 additions & 0 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ pre {padding: 5px; margin: 5px; color: inherit !important}
border-left: 5px solid #a94442 !important; /* red, overrides also default blue when editing */
}

.error-text {
color: #a94442;
}

.form-control::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
color: lightgrey;
opacity: 1; /* Firefox */
Expand Down

0 comments on commit 91b82e0

Please sign in to comment.