angular conditional required validator code example
Example: conditional in form control
<form novalidate [formGroup]="formUsers">
.....
....
<span>{{ formUsers.get('isChecked').value ? 'Enable' : 'Disabled' }}</span>
<form novalidate [formGroup]="formUsers">
.....
....
<span>{{ formUsers.get('isChecked').value ? 'Enable' : 'Disabled' }}</span>