From 4b01d8c98de16c84c36e11fc338fbf5d426ec7ea Mon Sep 17 00:00:00 2001 From: Jakub Bryska Date: Thu, 11 Jun 2026 14:25:00 +0200 Subject: [PATCH] docs: clarify value attribute on radio/checkbox inputs is allowed with formField --- .../angular-developer/references/signal-forms.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/skills/dev-skills/angular-developer/references/signal-forms.md b/skills/dev-skills/angular-developer/references/signal-forms.md index d40c9bcdee38..71a79f04ec76 100644 --- a/skills/dev-skills/angular-developer/references/signal-forms.md +++ b/skills/dev-skills/angular-developer/references/signal-forms.md @@ -170,10 +170,20 @@ Do _NOT_ bind the `name` field. When using `[formField]`, you MUST NOT set the following attributes in the template (either static or bound): - `min`, `max` (Use validators in the schema instead) -- `value`, `[value]`, `[attr.value]` (Already handled by `[formField]`) +- `value`, `[value]`, `[attr.value]` on **text/number/date inputs** (Already handled by `[formField]`) - `[attr.min]`, `[attr.max]` - `[disabled]`, `[readonly]` (Already handled by `[formField]`) +**Exception**: Static `value` on `` and `` is **allowed and required** — it identifies which option the input represents, not the bound field value. + +```html + + + + + +``` + Do NOT do this: `` or ``. ```html @@ -520,7 +530,7 @@ form( | **Multi-select array** | `` | Use `readonly()` rule in schema | | **min/max attributes** | `` | Use `min()` and `max()` rules in schema | -| **value binding** | `` | Do NOT use `[value]` with `[formField]` | +| **value binding** | `` | Do NOT use `[value]` with `[formField]` (static `value` on radio/checkbox is OK) | | **when option** | `pattern(p.x, /.../, {when: ...})` | `when` only works with `required()` | | **Submit callback** | `submit(form, () => { ... })` | `submit(form, async () => { ... })` | | **Async params** | `params: s.field` | `params: ({ value }) => value()` |