Skip to content

docs: clarify Signal Forms does not drive native HTML validity#69712

Closed
franmc01 wants to merge 1 commit into
angular:mainfrom
franmc01:docs-signals-native-validation
Closed

docs: clarify Signal Forms does not drive native HTML validity#69712
franmc01 wants to merge 1 commit into
angular:mainfrom
franmc01:docs-signals-native-validation

Conversation

@franmc01

@franmc01 franmc01 commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

PR Checklist

PR Type

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

The Signal Forms validation guide doesn't state that validation is independent of the browser's native HTML constraint validation. This surprises users: min()/max() on a type="number" input show native :invalid styling, while minLength()/maxLength() on a text input do not — even though both reflect their attribute. Per maintainer feedback on the issue, interfacing with native HTML validation is not a design goal, and this should be documented.

Issue Number: #69690

What is the new behavior?

  • Adds a NOTE to the "Built-in validation rules" section explaining that Signal Forms never drives native validity (:valid/:invalid, validity, validationMessage), that any native :invalid you see comes from the browser evaluating the reflected attribute and is inconsistent across rules, and that invalid()/errors() signals are the source of truth.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Fixes #69690

Signal Forms validation does not integrate with the browser's native
constraint validation, so native :invalid styling is inconsistent across
rules (for example min()/max() on a number input appear invalid while
minLength()/maxLength() do not). Add a note explaining that Signal Forms
never sets native validity and that the field's invalid() and errors()
signals are the source of truth.

Fixes angular#69690
@pullapprove pullapprove Bot requested a review from JeanMeche July 9, 2026 14:04
@angular-robot angular-robot Bot added the area: docs Related to the documentation label Jul 9, 2026
@ngbot ngbot Bot added this to the Backlog milestone Jul 9, 2026
@JeanMeche

JeanMeche commented Jul 9, 2026

Copy link
Copy Markdown
Member

There is too much to correct in this suggestion. We'll take it from here

@JeanMeche JeanMeche closed this Jul 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: docs Related to the documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

minLength() and maxLength() don't set input validity

2 participants