Is there an event to know when a form is valid?

Subscribe to statusChanges

this.myForm.statusChanges
.filter(s => s == 'VALID')
.subscribe(val => onValid())

For Angular with RxJs 6+ (where you need to use pipe):

this.form.statusChanges
  .pipe(
    filter(() => this.form.valid))
  .subscribe(() => this.onFormValid());

this.form.valid is a property that is boolean and so will either be true or false. Hence the filter will return true when the form is valid and the subscribe will then only call this.onFormValid() when the property is true.

You can see what is going on by doing this:

  public ngOnInit() {
    this.form.statusChanges
      .pipe(
        filter((status: string) => {console.log(status); return this.form.valid}))
      .subscribe(() => this.onFormValid());
  }

  private onFormValid() {
    console.log('form is valid')
  }

One should also unsubscribe or take (complete), eg:

this.form.statusChanges
  .pipe(
    filter(() => this.form.valid)),
    takeUntil(this.destroy$)
  .subscribe(() => this.onFormValid());

ngOnDestroy() {
  this.destroy$.next();
}