Validator.optional in angular 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>