Enforce min/max for mat-input fields for ATM switch

This commit is contained in:
grossmj 2024-05-19 17:11:47 +07:00
parent a3d149dcbe
commit 6c292aeb24
No known key found for this signature in database
GPG Key ID: 0A2D76AC45EA25CD

View File

@ -50,18 +50,19 @@
</form>
<form [formGroup]="abstractForm">
<mat-form-field class="form-field">
<input matInput type="number" min="0" [(ngModel)]="sourceVpi" formControlName="sourceVpi" placeholder="VPI" />
<input matInput type="number" min="1" [(ngModel)]="sourceVpi" formControlName="sourceVpi" placeholder="VPI" />
</mat-form-field>
</form>
<form [formGroup]="inputForm">
<mat-form-field class="form-field">
<input matInput type="number" min="0" [(ngModel)]="sourceVci" formControlName="sourceVci" placeholder="VCI" />
<input matInput type="number" min="1" [(ngModel)]="sourceVci" formControlName="sourceVci" placeholder="VCI" />
</mat-form-field>
Destination
<mat-form-field class="form-field">
<input
matInput
type="number"
min="0"
[(ngModel)]="destinationPort"
formControlName="destinationPort"
placeholder="Port"
@ -73,6 +74,7 @@
<input
matInput
type="number"
min="1"
[(ngModel)]="destinationVpi"
formControlName="destinationVpi"
placeholder="VPI"
@ -84,6 +86,7 @@
<input
matInput
type="number"
min="1"
[(ngModel)]="destinationVci"
formControlName="destinationVci"
placeholder="VCI"