Files
alfresco-ng2-components/lib/content-services/search/components/search-number-range/search-number-range.component.html
bbcodrin 8cc07f5816 [ADF-3238] content size min error added (#3532)
* content size min error added

* clean code
2018-08-14 15:42:00 +01:00

39 lines
1.5 KiB
HTML

<form [formGroup]="form" novalidate (ngSubmit)="apply(form.value, form.valid)">
<mat-form-field>
<input
matInput [formControl]="from" [errorStateMatcher]="matcher"
placeholder="{{ 'SEARCH.FILTER.RANGE.FROM' | translate }}"
autocomplete="off">
<mat-error *ngIf="from.hasError('pattern') || from.hasError('min')">
{{ 'SEARCH.FILTER.VALIDATION.INVALID-FORMAT' | translate }}
</mat-error>
<mat-error *ngIf="from.hasError('required')">
{{ 'SEARCH.FILTER.VALIDATION.REQUIRED-VALUE' | translate }}
</mat-error>
</mat-form-field>
<mat-form-field>
<input
matInput [formControl]="to" [errorStateMatcher]="matcher"
placeholder="{{ 'SEARCH.FILTER.RANGE.TO' | translate }}"
autocomplete="off">
<mat-error *ngIf="to.hasError('pattern') || to.hasError('min')">
{{ 'SEARCH.FILTER.VALIDATION.INVALID-FORMAT' | translate }}
</mat-error>
<mat-error *ngIf="to.hasError('required')">
{{ 'SEARCH.FILTER.VALIDATION.REQUIRED-VALUE' | translate }}
</mat-error>
</mat-form-field>
<div class="facet-buttons">
<button mat-button color="primary" type="button" (click)="reset()">
{{ 'SEARCH.FILTER.ACTIONS.CLEAR' | translate }}
</button>
<button mat-button color="primary" type="submit" [disabled]="!form.valid">
{{ 'SEARCH.FILTER.ACTIONS.APPLY' | translate }}
</button>
</div>
</form>