bug(mat-checkbox): with Signal Forms `required()`, MatCheckbox's own validator adds a duplicate `required` error that hides the schema error message
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- angular, typescript
調査の方向性
Start by tracing how Signal Forms errors are combined with the MatCheckbox validator; the issue names MatCheckbox.validate() and CompatValidationError but does not identify source files or tests. Reproduce with the linked StackBlitz and inspect the error output. Done means the field exposes only the schema’s required error, including its custom message.
索引モデルが issue の本文から書いたものです。
説明
Is this a regression?
- Yes, this behavior used to work in the previous version
The previous version in which this bug was not present was
No response
Description
When a mat-checkbox is bound to a Signal Forms field with [formField] and the schema uses required(), the field ends up with two errors of kind required:
- the schema error from
required(path, { message })- has the custommessage; - a
CompatValidationError(kindrequired, nomessage) produced byMatCheckbox.validate().
This happens with many components which have 'required' input and validate method from Validators interface.
Reproduction
StackBlitz link: https://stackblitz.com/edit/1sinlau9-qd7bhr37?file=src%2Fexample%2Fcheckbox-signal-forms-example.ts
Steps to reproduce:
- Open the console
- Click the 'Show errors' button. The first
getError('required)log showskind: requiredandmessage: undefined. The seconderrors()log shows 2 errors.
As the result nothing is rendered
Expected Behavior
- The field has a single
requirederror, the one from the schema.
Actual Behavior
errors()contains tworequirederrors: first aCompatValidationErrorfromMatCheckbox.validate()(messageisundefined), then the schema error.getError('required')returns the first one, sogetError('required')?.messageisundefinedand nothing is rendered.
Environment
- Angular: 22.0.6
- CDK/Material: 22.0.4
- Browser(s): Google Chrome Version 154.0.8037.98
- Operating System: MacOs 27.0
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 5時間
- マージ済み PR(30日)
- 67
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
angular/components のほかの issue
-
bug(material/sort): hover hint arrow on an unsorted header shows the active sort direction, not the resulting direction after click.対応中かも @lekhmanrus が 11 日前に担当しました。 オープンarea: material/sort P3
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
angular/components#33933 ·
メンテナーはふだん 1 日以内に返信
-
bug(mat-date-picker): month shown twice in date picker対応中かも @PreethiPantangi が 28 日前に担当しました。 オープンarea: material/datepicker P4
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
angular/components#33763 · コメント 2 件 · リアクション 3 件 ·
メンテナーはふだん 1 日以内に返信
-
Bug in table.scss footer cell height: unset instead of footer row height unset対応中かも @minwookshin が 15 日前に担当しました。 オープンarea: material/table P4
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
angular/components#33709 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
docs-bug(Table): Add example with `rowspan`対応中かも @BHUVANSH855 が 96 日前に担当しました。 オープンarea: material/table docs P4
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
angular/components#33455 ·
メンテナーはふだん 1 日以内に返信
-
bug(date-adapter): Misleading JSDoc for createDate returns type対応中かも @BHUVANSH855 が 145 日前に担当しました。 オープンarea: material/core P3
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
angular/components#33059 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
angular/components の issue をすべて見る
似ている issue
-
[测试] 等待仓库加载后再记录多仓库排序基线対応中かも @myot233 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
メンテナーはふだん 1 日以内に返信
-
area:arcade p3-medium ready-for-agent testing type:docs
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
fderuiter/deruiter.dev#2369 ·
メンテナーはふだん 1 日以内に返信
-
area:devenv origin:agent type:bug
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
overengineeringstudio/effect-utils#1949 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
ccch1mneyyy/dsh-TUI#1631 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
MiniMax-AI/minimax-code#507 ·
メンテナーはふだん 1 日以内に返信