docs: clarify Signal Forms does not drive native HTML validity#69712
Closed
franmc01 wants to merge 1 commit into
Closed
docs: clarify Signal Forms does not drive native HTML validity#69712franmc01 wants to merge 1 commit into
franmc01 wants to merge 1 commit into
Conversation
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
Member
|
There is too much to correct in this suggestion. We'll take it from here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Checklist
PR Type
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 atype="number"input show native:invalidstyling, whileminLength()/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?
NOTEto the "Built-in validation rules" section explaining that Signal Forms never drives native validity (:valid/:invalid,validity,validationMessage), that any native:invalidyou see comes from the browser evaluating the reflected attribute and is inconsistent across rules, and thatinvalid()/errors()signals are the source of truth.Does this PR introduce a breaking change?
Other information
Fixes #69690