How should a flexible FormControl in angular2 create FormGroup optimality?

this set of forms has three sets of states, but input is required and needs to be validated. When input is hidden, you don"t need to validate the form, and you don"t need its value;
now, with this switch, how do you create FormGroup optimization? My current practice is as follows, switching only the changes. I wonder if there is any other easier way.

<form [formGroup]="">
    <form [formGroup]="">
        ...
    </form>
</form>
Mar.29,2021
Menu