Angular error NG01101 means an async validator returned the wrong kind of value. It must return a Promise or Observable that resolves or emits null for a valid value or a ValidationErrors object for an invalid one. A plain boolean, null, or error object returned directly does not satisfy the contract.
What NG01101 means
Angular expects an async validator to produce its result asynchronously, even when the result indicates success. For an Observable-based validator, that means emitting either null or an error map; for a Promise-based validator, it means resolving to one of those values. See Angular’s NG01101 error reference and the AsyncValidator API.
As an Amazon Associate I earn from qualifying purchases.
nullmeans validation succeeded.- A
ValidationErrorsobject means validation failed. Its keys identify the validation error, and its values can provide related details.
For example, an Observable validator can return of({ notTen: true, requiredValue: 10 }) when a value is invalid and of(null) when it is valid. Both branches return an Observable; returning the object or null directly is the mistake.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteCheck how the validator is registered
In a reactive form, a FormControl constructor accepts synchronous validators as its second argument and async validators as its third. If a synchronous validator is placed in the async-validator position, Angular may report NG01101. The FormControl API documents the constructor arguments.
#1 Best Overall
new FormControl(initialValue, syncValidators, asyncValidators)
Angular runs async validators only after all synchronous validators pass, as explained in its form validation guide. This ordering can help distinguish a registration problem from a return-value problem.
Fix the return value on every branch
Inspect the value each code path actually returns, including success, failure, and early-return branches. A TypeScript annotation does not convert a synchronous value into a Promise or Observable at runtime.
Rank #2
Observable example
const validator: AsyncValidatorFn = (control) =>
service.check(control.value).pipe(
map((isInvalid) => isInvalid ? { unavailable: true } : null),
take(1),
catchError(() => of(null)), // Choose this policy deliberately.
);
This illustrative pattern maps a service result to ValidationErrors | null and limits the stream to one emission. Adapt the service call and error policy to your application; the example is not a universal implementation.
Promise example
A Promise-based validator must likewise resolve to the error map or null. Returning a direct boolean from a function declared as an async validator is still wrong; wrap the asynchronous operation in a Promise and resolve its result in the required form.
Rank #3
Make Observable validators complete
Angular expects an async-validator Observable to complete. Until validation finishes, the control can remain pending. If a service returns a stream that stays open, limit or otherwise complete it. Angular’s form guide lists operators such as first, last, take, and takeUntil as ways to make an Observable finite.
Choose what happens when the request fails
A network or service error is separate from whether the entered value is valid, so decide explicitly how the application should treat it. Angular’s guide demonstrates catchError returning of(null); that policy treats the failed request as successful validation. An application can instead return an Observable of a validation error. Choose based on the consequences of allowing or blocking submission when the check cannot run.
Rank #4
Distinguish synchronous and asynchronous validators
Use a synchronous validator for checks that can decide from the control value immediately, such as a format rule. Use an async validator when the decision depends on asynchronous work, such as a service response. The difference affects both the validator’s return contract and where it is registered in a reactive FormControl. Angular documents the asynchronous contract in its AsyncValidatorFn API; this is a next.angular.dev API URL, while the error reference and guide linked above are on angular.dev.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




