Co-authored-by: Anika Tibrewala <89638069+Ann-001@users.noreply.github.com>
This commit is contained in:
Anika Tibrewala
2022-11-19 12:48:53 +05:30
committed by GitHub
co-authored by Anika Tibrewala
parent d12217a356
commit 8f8b2ee02d
2 changed files with 5 additions and 2 deletions
@@ -32,10 +32,13 @@
<mat-form-field fxFlex="48%">
<mat-label>Age</mat-label>
<input type="number" formControlName="age" matInput />
<input type="number" formControlName="age" matInput min="0"/>
<mat-error *ngIf="familyMemberForm.controls.age.hasError('required')">
Age is <strong>required</strong>
</mat-error>
<mat-error *ngIf="familyMemberForm.controls.age.hasError('min')">
Age cannot be <strong>negative</strong>
</mat-error>
</mat-form-field>
<mat-checkbox formControlName="isDependent" labelPosition="before" fxFlex="48%">Is Dependent?</mat-checkbox>
@@ -67,7 +67,7 @@ export class ClientFamilyMemberDialogComponent implements OnInit {
'middleName': [''],
'lastName': ['', Validators.required],
'qualification': [''],
'age': [''],
'age': ['', Validators.required, Validators.min(0)],
'isDependent': [''],
'relationshipId': ['', Validators.required],
'genderId': [''],