Skip to content

Commit f8e083e

Browse files
committed
Add missing validation messages in metadata editor dialog
1 parent 53f8798 commit f8e083e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/app/image-metadata-dialog/image-metadata-dialog.component.html

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,17 @@ <h3>Recommended Versions</h3>
8585
<div class="form-field">
8686
<label [for]="'recommended_version_' + i">Version *</label>
8787
<input [id]="'recommended_version_' + i" type="text" formControlName="version">
88+
@if (item.get('version')?.touched && item.get('version')?.invalid) {
89+
<div class="error">Version is required</div>
90+
}
8891
</div>
8992

9093
<div class="form-field">
9194
<label [for]="'recommended_date_' + i">Date *</label>
9295
<input [id]="'recommended_date_' + i" type="date" formControlName="date">
96+
@if (item.get('date')?.touched && item.get('date')?.invalid) {
97+
<div class="error">Date is required</div>
98+
}
9399
</div>
94100

95101
<button type="button" class="remove-btn" (click)="removeRecommended(i)">Remove</button>
@@ -276,6 +282,9 @@ <h4>Auto Test #{{i + 1}}</h4>
276282
<div class="form-field">
277283
<label [for]="'auto_test_docker_image_' + i">Docker Image *</label>
278284
<input [id]="'auto_test_docker_image_' + i" type="text" formControlName="docker_image">
285+
@if (autoTest.get('docker_image')?.touched && autoTest.get('docker_image')?.invalid) {
286+
<div class="error">Docker image is required</div>
287+
}
279288
</div>
280289

281290
<div class="form-field">
@@ -296,6 +305,9 @@ <h4>Auto Test #{{i + 1}}</h4>
296305
<div class="form-field">
297306
<label [for]="'auto_test_commands_' + i">Commands *</label>
298307
<textarea [id]="'auto_test_commands_' + i" formControlName="commands" rows="4"></textarea>
308+
@if (autoTest.get('commands')?.touched && autoTest.get('commands')?.invalid) {
309+
<div class="error">Commands are required</div>
310+
}
299311
</div>
300312

301313
<!-- Input Files for this Auto Test -->

0 commit comments

Comments
 (0)