29 lines
837 B
HTML
29 lines
837 B
HTML
<!--
|
|
Copyright since 2025 Mifos Initiative
|
|
|
|
This Source Code Form is subject to the terms of the Mozilla Public
|
|
License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
-->
|
|
|
|
<mat-form-field class="flex-100">
|
|
<mat-label>{{ label }}</mat-label>
|
|
<input
|
|
matInput
|
|
[disabled]="disabled"
|
|
[errorStateMatcher]="matcher"
|
|
(focusout)="onFocusOut()"
|
|
(input)="onInput($event)"
|
|
[required]="required"
|
|
[type]="type"
|
|
[value]="value"
|
|
/>
|
|
<mat-icon matSuffix (click)="onVisibilityClick($event)">{{ icon }}</mat-icon>
|
|
@if (ngControl.hasError('required')) {
|
|
<mat-error>{{ label }} is a required field.</mat-error>
|
|
}
|
|
@if (ngControl.hasError(customErrorName)) {
|
|
<mat-error>{{ customErrorMessage }}</mat-error>
|
|
}
|
|
</mat-form-field>
|