Merge pull request #3189 from JaySoni1/WEB-760-validation-and-error-message-improvements-for-add-column-dialog

WEB-760 Validation and error message improvements for Add Column dialog
This commit is contained in:
Jose Alberto Hernandez
2026-02-19 17:02:25 -05:00
committed by GitHub
2 changed files with 17 additions and 1 deletions
@@ -49,9 +49,16 @@
matInput
required
type="number"
min="1"
formControlName="length"
placeholder="{{ 'labels.inputs.Column Length' | translate }}"
/>
@if (columnForm.controls.length.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Column Length' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
}
@@ -65,6 +72,12 @@
</mat-option>
}
</mat-select>
@if (columnForm.controls.code.hasError('required')) {
<mat-error>
{{ 'labels.inputs.Column Code' | translate }} {{ 'labels.commons.is' | translate }}
<strong>{{ 'labels.commons.required' | translate }}</strong>
</mat-error>
}
</mat-form-field>
}
@@ -76,7 +76,10 @@ export class ColumnDialogComponent implements OnInit {
value: this.data ? +this.data.columnLength : '',
disabled: this.getColumnType(this.data.columnDisplayType) !== 'String' || this.data.type === 'existing'
},
Validators.required
[
Validators.required,
Validators.min(1)
]
],
mandatory: [{ value: this.data.isColumnNullable, disabled: this.data.type === 'existing' }],
unique: [