Fairoj : General info kyc field validation issue fixed

This commit is contained in:
venbatechnologies@gmail.com 2020-01-11 16:54:20 +05:30
parent c335b6f3a7
commit 3078057dcd
2 changed files with 9 additions and 3 deletions

View File

@ -156,7 +156,7 @@
<!-- RI month and year ends-->
<mat-card *ngIf="checksalaried == false">
<mat-form-field style="width:30%" class="mt-1">
<mat-select placeholder="Is the applicant name same as per KYC" formControlName="is_kyc" (selectionChange)="kycchange($event.value)" required>
<mat-select placeholder="Is the applicant name same as per KYC" formControlName="is_kyc" (selectionChange)="kycchange($event.value)">
<mat-option>Select</mat-option>
<mat-option *ngFor="let val of KYC" [value]="val.value">
{{val.isdisplayvalue}}

View File

@ -166,7 +166,7 @@ export class GeneralInfoComponent implements OnInit {
company_with_relationships: this._fb.array([]),
rental_income_rcv_in_years: '',
rental_income_rcv_in_month: '',
is_kyc: '',
is_kyc: ['',Validators.compose([Validators.required])],
kyc_and_captur_the_name: '',
general_remark: ''
})
@ -1014,7 +1014,13 @@ salariedcheck(){
console.log(control_value.length == 0)
this.checksalaried = control_value.length == 0
if(this.checksalaried){
this._generalForm.get('is_kyc').clearValidators();
}
else{
this._generalForm.get('is_kyc').setValidators(Validators.compose([Validators.required]))
}
this._generalForm.get('is_kyc').updateValueAndValidity()
}
}