Skip to content

docs: use transformedValue in Forms | Custom Controls | Value transformation section - #70208

Open
nsbarsukov wants to merge 2 commits into
angular:mainfrom
nsbarsukov:doc-custom-controls-value-transformation
Open

docs: use transformedValue in Forms | Custom Controls | Value transformation section#70208
nsbarsukov wants to merge 2 commits into
angular:mainfrom
nsbarsukov:doc-custom-controls-value-transformation

Conversation

@nsbarsukov

Copy link
Copy Markdown
Contributor

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?

Issue Number: 70206
Fixes #70206

The "Value transformation" section taught readers to hand-roll transformation with linkedSignal() and a manual parse method, even though @angular/forms/signals ships transformedValue() for exactly this case. Readers ended up with a weaker version of a feature the framework already provides — notably, no parse error reporting.

What is the new behavior?

Rewrite the section around transformedValue() and document the parts the manual pattern could not cover: returning {error} from parse to surface parse errors on the field's errors(), and reset() clearing them. This also makes good on the cross-reference from the validation guide, which pointed here for parse error details the section never covered.

Does this PR introduce a breaking change?

  • Yes
  • No

…sformation` section

The "Value transformation" section taught readers to hand-roll
transformation with `linkedSignal()` and a manual parse method, even
though `@angular/forms/signals` ships `transformedValue()` for exactly
this case. Readers ended up with a weaker version of a feature the
framework already provides — notably, no parse error reporting.

Rewrite the section around `transformedValue()` and document the parts
the manual pattern could not cover: returning `{error}` from `parse` to
surface parse errors on the field's `errors()`, and `reset()` clearing
them. This also makes good on the cross-reference from the validation
guide, which pointed here for parse error details the section never
covered.

Fixes angular#70206
@pullapprove
pullapprove Bot requested a review from atscott August 14, 2026 13:39
@angular-robot angular-robot Bot added the area: docs Related to the documentation label Aug 14, 2026
@ngbot ngbot Bot added this to the Backlog milestone Aug 14, 2026

A field with parse errors is invalid, which blocks submission the same way a failed validation rule does.

HELPFUL: Signal Forms uses the same mechanism for native inputs. When the browser cannot parse a value (for example, a partially typed date in `<input type="date">`), it surfaces as a `parse` error on the field. See [Native HTML validation](guide/forms/signals/validation#native-html-validation) for details.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment thread adev/src/content/guide/forms/signals/custom-controls.md Outdated
@JeanMeche
JeanMeche requested review from JeanMeche and bencodezen and removed request for atscott August 14, 2026 13:43
Co-authored-by: Matthieu Riegler <kyro38@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Related to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs(forms): "Value transformation" section for custom controls does not mention transformedValue

2 participants