Title: Signal Forms interop: `transformedValue` parse errors reach a `FormValueControl` one change detection late under `ngModel` and `[formControl]` · Issue #71127 · angular/angular · GitHub
Open Graph Title: Signal Forms interop: `transformedValue` parse errors reach a `FormValueControl` one change detection late under `ngModel` and `[formControl]` · Issue #71127 · angular/angular
X Title: Signal Forms interop: `transformedValue` parse errors reach a `FormValueControl` one change detection late under `ngModel` and `[formControl]` · Issue #71127 · angular/angular
Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description A FormValueControl that parses its text with transformedValue reports a parse error to ngModel and [formControl] through NgControl.setParse...
Open Graph Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description A FormValueControl that parses its text with transformedValue reports a parse error to ngModel and ...
X Description: Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description A FormValueControl that parses its text with transformedValue reports a parse error to ngModel and ...
Opengraph URL: https://github.com/angular/angular/issues/71127
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Signal Forms interop: `transformedValue` parse errors reach a `FormValueControl` one change detection late under `ngModel` and `[formControl]`","articleBody":"### Which @angular/* package(s) are the source of the bug?\n\nforms\n\n### Is this a regression?\n\nNo\n\n### Description\n\nA `FormValueControl` that parses its text with `transformedValue` reports a parse error to `ngModel` and `[formControl]` through `NgControl.setParseErrorSource()`. The `FormControl` gets the error, but the control's own `errors` input does not follow until something else checks the host. Under `[formField]` it arrives at once.\n\n```ts\n@Component({\n selector: 'app-number-input',\n template: `\n \u003cinput [value]=\"text()\" (input)=\"text.set($any($event.target).value)\" />\n \u003cp>errors this control sees: {{ errors().length }}\u003c/p>\n `,\n})\nexport class NumberInput implements FormValueControl\u003cnumber | null> {\n readonly value = model\u003cnumber | null>(null);\n readonly errors = input\u003creadonly ValidationError.WithOptionalFieldTree[]>([]);\n\n protected readonly text = transformedValue(this.value, {\n parse: (text: string): ParseResult\u003cnumber | null> => {\n if (text === '') return { value: null };\n const parsed = Number(text);\n return Number.isNaN(parsed) ? { error: { kind: 'parse', message: 'Not a number.' } } : { value: parsed };\n },\n format: (value: number | null) => (value === null ? '' : String(value)),\n });\n}\n\n@Component({\n imports: [ReactiveFormsModule, NumberInput],\n template: `\n \u003capp-number-input [formControl]=\"control\" />\n \u003c!-- Any event handler marks the host for check. -->\n \u003cbutton (click)=\"(0)\">Check again\u003c/button>\n `,\n})\nexport class App {\n readonly control = new FormControl\u003cnumber | null>(null);\n}\n```\n\n1. Type `x` into the input.\n2. `control.errors` is `{ parse: { kind: 'parse', message: 'Not a number.' } }`, but the control still renders `errors this control sees: 0`.\n3. Click **Check again**: it now renders `errors this control sees: 1`.\n\nThe same happens with `[(ngModel)]`. Bound with `[formField]`, the control renders `1` right after step 1.\n\nThe cause looks like the effect in `setParseErrorSource()`. It calls `this.control?.updateValueAndValidity({ emitEvent: false })`, so `statusChanges` never emits and the `markForCheck` subscription that `setupCustomControl()` sets up never fires. `ngControlUpdate()`, which forwards `errors` to the control, then waits for the next unrelated check of the host. Marking the host for check from that effect would fix it.\n\n### Minimal reproduction\n\nThe two components above, zoneless, nothing else.\n\n### Exception or error\n\nNone: the control renders stale errors.\n\n### Environment\n\nAngular CLI 22.2.0, Angular 22.2.0, Node.js 26.7.0, darwin arm64. `setParseErrorSource()` is the same in 22.2.1, 22.3.0-next.0 and on `main`.\n\n### Anything else?\n\nThe workaround in the control: a `markForCheck()` after the next render whenever its parse errors change.\n","author":{"url":"https://github.com/Cynthion","@type":"Person","name":"Cynthion"},"datePublished":"2026-10-01T19:06:36Z","url":"https://github.com/angular/angular/issues/71127"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:71c7f5c4-1c00-4050-db28-f35a177cb71d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABD0:2D2F2F:38BE1F7:48620FF:6B01E89B |
| html-safe-nonce | 0581d26d51967986125ffd3c77849ffed12f54f53561f8b9376b356fcb469252 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkQwOjJEMkYyRjozOEJFMUY3OjQ4NjIwRkY6NkIwMUU4OUIiLCJ2aXNpdG9yX2lkIjoiNDgwNTk3MDA3NzAzODAxMjU3MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5958e430ef0669a3ca3526afca856a733286d869c1260a69bda526a22ac75c97 |
| hovercard-subject-tag | issue:5667629835 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/71127/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5d584005c6336b50d1d829dcb7ed2d58112f9838ec931a8b9ab7a549a8310036/angular/angular/issues/71127 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5d584005c6336b50d1d829dcb7ed2d58112f9838ec931a8b9ab7a549a8310036/angular/angular/issues/71127 |
| og:image:alt | Which @angular/* package(s) are the source of the bug? forms Is this a regression? No Description A FormValueControl that parses its text with transformedValue reports a parse error to ngModel and ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Cynthion |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width