From fe7b26e403febfe2662828945d41bc4567cbcc8b Mon Sep 17 00:00:00 2001 From: Sonu Kapoor Date: Wed, 25 Feb 2026 11:13:12 -0500 Subject: [PATCH] docs(forms): transformedValue parse error wiring (cherry picked from commit 547ed65b6f44908d1377f1656853c0266ac798a1) --- packages/forms/signals/src/api/transformed_value.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/forms/signals/src/api/transformed_value.ts b/packages/forms/signals/src/api/transformed_value.ts index ab4d67192c9..56b1e5a8826 100644 --- a/packages/forms/signals/src/api/transformed_value.ts +++ b/packages/forms/signals/src/api/transformed_value.ts @@ -23,7 +23,7 @@ import type {OneOrMany} from './types'; */ export interface ParseResult { /** - * The parsed value, if parsing was successful. + * The parsed value. If omitted, the model is not updated. */ readonly value?: TValue; /** @@ -75,6 +75,14 @@ export interface TransformedValueSignal extends WritableSignal { * representation into an underlying model value. For example, a numeric input that displays and * accepts string values but stores a number. * + * Parse errors are exposed via the returned signal’s `parseErrors()` property. + * When `transformedValue` is used within a Signal Forms field context, parse errors are also + * reported to the nearest field automatically. When no field context is present, no automatic + * reporting occurs and `parseErrors` can be consumed directly. + * + * Note: `parse` may return both a `value` and an `error`. Returning `value` updates the model; + * omitting it leaves the model unchanged. + * * @param value The model signal to synchronize with. * @param options Configuration including `parse` and `format` functions. * @returns A `TransformedValueSignal` representing the raw value with parse error tracking.