File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
packages/forms/signals/src/api Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ import type {OneOrMany} from './types';
2323 */
2424export interface ParseResult < TValue > {
2525 /**
26- * The parsed value, if parsing was successful .
26+ * The parsed value. If omitted, the model is not updated .
2727 */
2828 readonly value ?: TValue ;
2929 /**
@@ -75,6 +75,14 @@ export interface TransformedValueSignal<TRaw> extends WritableSignal<TRaw> {
7575 * representation into an underlying model value. For example, a numeric input that displays and
7676 * accepts string values but stores a number.
7777 *
78+ * Parse errors are exposed via the returned signal’s `parseErrors()` property.
79+ * When `transformedValue` is used within a Signal Forms field context, parse errors are also
80+ * reported to the nearest field automatically. When no field context is present, no automatic
81+ * reporting occurs and `parseErrors` can be consumed directly.
82+ *
83+ * Note: `parse` may return both a `value` and an `error`. Returning `value` updates the model;
84+ * omitting it leaves the model unchanged.
85+ *
7886 * @param value The model signal to synchronize with.
7987 * @param options Configuration including `parse` and `format` functions.
8088 * @returns A `TransformedValueSignal` representing the raw value with parse error tracking.
You can’t perform that action at this time.
0 commit comments