How to set Validator to required if visible?
<p>I am wondering how I can set the Validator in the following form to Required, only if the form element is present:</p>

<pre><code>&lt;div *ngIf="form.controls.user.value !== 'Admin' &amp;&amp; form.controls.user.value "&gt;
        &lt;label&gt;Role:&lt;/label&gt;
        &lt;input type="text" ngControl="role"&gt;
&lt;/div&gt;
</code></pre>

<p>And my form is:</p>

<pre><code>       this.form = this._formBuilder.group({
        user: ['',Validators.required],
        role: ['', Validators.required]
    });
</code></pre>