Skip to content

fix(forms): mark custom control for check when signal form parse errors change - #71134

Closed
drakeo338 wants to merge 1 commit into
angular:mainfrom
drakeo338:claude/71127-fix
Closed

drakeo338 wants to merge 1 commit into
angular:mainfrom
drakeo338:claude/71127-fix

Conversation

@drakeo338

Copy link
Copy Markdown

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

The parse error effect in NgControl.setParseErrorSource() revalidates the control with emitEvent: false, so statusChanges never emits and the markForCheck subscription for custom controls does not run. A FormValueControl using transformedValue receives its errors input one change detection late under OnPush and zoneless.

Issue Number: #71127

What is the new behavior?

The effect calls markForCheck() on the control's view directly, so parse errors reach the control in the same change detection pass. Tests cover ngModel and [formControl].

Fixes #71127

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Verified with pnpm bazel test //packages/forms/signals/test/web:test_chromium: the new tests fail without the source change and pass with it.

…rs change

The parse error effect in `NgControl.setParseErrorSource()` revalidates the
control with `emitEvent: false`, so `statusChanges` never emits and the
`markForCheck` subscription set up for custom controls never runs. The
control's `errors` input then stays stale under OnPush and zoneless.
Mark the view for check from the effect directly.

Fixes angular#71127
@pullapprove
pullapprove Bot requested a review from JeanMeche October 2, 2026 00:32
@ngbot ngbot Bot added this to the Backlog milestone Oct 2, 2026
@JeanMeche

Copy link
Copy Markdown
Member

Thanks for the suggestion, but this should be addressed by #71132

@JeanMeche JeanMeche closed this Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Signal Forms interop: transformedValue parse errors reach a FormValueControl one change detection late under ngModel and [formControl]

2 participants