Description
Which @angular/* package(s) are the source of the bug?
forms
Is this a regression?
No
Description
Hello,
i am aware of at least these two related issues:
#41519, #13200, but was not able to reopen either of them, so - sorry for the duplicate report.
I have a reactive form defined with a single text field. It has both a required validator, and a simple asynchronous validator. The field is initialized in the class constructor by calling form.patchValue() - see the reproduction link. As a result, the form enters PENDING state, a statusChanges value is emitted, and also a StatusChangeEvent. However, as soon as the asynchronous validator completes, there is no statusChanges value emitted, neither a StatusChangeEvent.
What was expected:
having a look at #41519 (comment), i think it is probably not expected that a VALID statusChanges value is emitted. However, it is expected that a StatusChangeEvent is emitted.
What happened:
Neither a VALID statusChanges value was emitted, nor a VALID StatusChangeEvent.
Please provide a link to a minimal reproduction of the bug
https://stackblitz.com/edit/stackblitz-starters-t7ffjddq?file=src%2Fmain.ts
Please provide the exception or error you saw
as mentioned above - there is no error occurring, but the behavior is different than expected
Please provide the environment you discovered this bug in (run ng version
)
Angular CLI: 19.1.5
Node: 20.17.0
Package Manager: npm 10.8.2
OS: win32 x64
Angular: 19.1.4
... animations, common, compiler, compiler-cli, core, forms
... language-service, platform-browser, platform-browser-dynamic
... router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1901.5
@angular-devkit/build-angular 19.1.5
@angular-devkit/core 19.1.5
@angular-devkit/schematics 19.1.5
@angular/cli 19.1.5
@schematics/angular 19.1.5
rxjs 7.8.1
typescript 5.7.3
zone.js 0.15.0
Anything else?
No response