Reactive Angular form to wait for async validator complete on submit : <p>I am building a reactive angular form and I'm trying to find a way to trigger all validators on submit. If the validor is a sync one, it'd be ok, as I can get the status of it inline. Otherwise, if the validator is an async one and it was not triggered yet, the form on <code>ngSubmit</code> method would be in pending status. I've tried to register a subscribe for the form <code>statusChange</code> property, but it's not triggered when I call for validation manualy with <code>markAsTouched</code> function.</p>

<p>Here's some snippets:</p>

<pre><code>   //initialization of form and watching for statusChanges
   ngOnInit() {
        this.ctrlForm = new FormGroup({
            'nome': new FormControl('', Validators.required),
            'razao_social': new FormControl('', [], CustomValidators.uniqueName),
            'cnpj': new FormControl('', CustomValidators.cnpj),
        });

        this.ctrlForm.statusChanges.subscribe(
            x =&gt; console.log('Observer got a next value: ' + x),
            err =&gt; console.error('Observer got an error: ' + err),
            () =&gt; console.log('Observer got a complete notification')
        )
    }
    //called on ngSubmit
    register(ctrlForm: NgForm) {
            Forms.validateAllFormFields(this.ctrlForm);
            console.log(ctrlForm.pending); 
            //above will be true if the async validator
            //CustomValidators.uniqueName was not called during form fill.
    }
    //iterates on controls and call markAsTouched for validation,
    //which doesn't fire statusChanges
    validateAllFormFields(formGroup: FormGroup) {         
          Object.keys(formGroup.controls).forEach(field =&gt; {  
              const control = formGroup.get(field);             
              if (control instanceof FormControl) {             
                control.markAsTouched({ onlySelf: true });
              } else if (control instanceof FormGroup) {        
                this.validateAllFormFields(control);            
              }
          });
      }
</code></pre>

<p>Any ideas on how can I ensure that the async validator was executed so I can continue with the register logic having all validators triggered and completed?</p>
