Reactive form async validation is not working as expected
See original GitHub issueπ bug report
Affected Package
The issue is caused by package @angular/forms@9.1.5Is this a regression?
Don't know.Description
Async validation of Reactive Forms from docs example passes if you type:- Eric (wait for validation),
- Erica (wait for validation)
- Eric and hit Submit. It works ok in Template-driven form.
π¬ Minimal Reproduction
Just download example from https://angular.io/guide/form-validation and play with it.π Your Environment
Angular Version:
Angular CLI: 9.1.4
Node: 12.13.0
OS: win32 x64
Angular: 9.1.5
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router, upgrade
Ivy Workspace: Yes
Package Version
-----------------------------------------------------------
@angular-devkit/architect 0.901.4
@angular-devkit/build-angular 0.901.4
@angular-devkit/build-optimizer 0.901.4
@angular-devkit/build-webpack 0.901.4
@angular-devkit/core 9.1.4
@angular-devkit/schematics 9.1.4
@angular/cli 9.1.4
@ngtools/webpack 9.1.4
@schematics/angular 9.1.4
@schematics/update 0.901.4
rxjs 6.5.5
typescript 3.8.3
webpack 4.42.0
Anything else relevant?
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Angular Async Validator not working as expected
I am tying to implement custom async validator in angular. But it does not seem to be working. There are no errors in...
Read more >Using Custom Async Validators in Angular Reactive Forms
Ocasionally, we want to validate some input in our fields before submission, which will be validated against an asynchronous source.
Read more >Angular forms validation. Part III. Async Validators gotchas
As soon as validation is completed FormGroup status becomes VALID So everything goes smooth and absolutely as expected.
Read more >Creating Angular Synchronous and Asynchronous Validators ...
Validators work primarily through what's returned from the validate() method. The validate(control:abstractControl): ValidationErrors|nullΒ ...
Read more >AsyncValidator - Angular
An interface implemented by classes that perform asynchronous validation. ... null> // inherited from forms/Validator validate(control: AbstractControl<any,Β ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@AndrewKushnir try click submit without leaving βAlter Egoβ field. Then you can see that there was no validation before submit. Check attached gif
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.