Skip to content

fix(multiple): avoid duplicate required error with signal forms - #33990

Closed
MeAkib wants to merge 1 commit into
angular:mainfrom
MeAkib:fix/checkbox-signal-forms-duplicate-required
Closed

MeAkib wants to merge 1 commit into
angular:mainfrom
MeAkib:fix/checkbox-signal-forms-duplicate-required

Conversation

@MeAkib

@MeAkib MeAkib commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

When a checkbox or slide toggle is bound to a signal forms field whose schema uses required(), signal forms set the component's required input and also run the component's own validator. This resulted in two required errors, and the one from the component doesn't have the message from the schema, which hides it when using getError('required').

These changes skip the component's required validation when it's bound to a signal forms field, since the schema already handles it.

Fixes #33945.

When a checkbox or slide toggle is bound to a signal forms field whose schema uses `required()`, signal forms set the component's `required` input and also run the component's own validator. This resulted in two `required` errors, and the one from the component doesn't have the message from the schema, which hides it when using `getError('required')`.

These changes skip the component's `required` validation when it's bound to a signal forms field, since the schema already handles it.

Fixes angular#33945.
@crisbeto

Copy link
Copy Markdown
Member

Handled in #33998.

@crisbeto crisbeto closed this Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(mat-checkbox): with Signal Forms required(), MatCheckbox's own validator adds a duplicate required error that hides the schema error message

2 participants