ng-bootstrap-form-validation
ng-bootstrap-form-validation copied to clipboard
BUG: Async Validators Prevent Submit
The validSubmit attribute of FormValidationDirective is emitted based on FormGroup's current status, as shown here -
if (this.formGroup.valid) {
this.validSubmit.emit(this.formGroup.value);
}
So if we're using an async validator, this condition will be false until async validation is resolved.
PR coming up...
OK, my original approach proved wrong.
the statusChanges observable is misbehaving and can't be trusted: When status is pending, no further events are emitted until another validation is triggered, not sure why.
So I simply skipped the second validation in case an async validation is present.
PR updated accordingly.
See #24