docs(pin-input): add sanitize value example - #10991
Closed
salehghotbani wants to merge 2 commits into
Closed
salehghotbani wants to merge 2 commits into
salehghotbani wants to merge 2 commits into
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
|
Thanks a lot for these examples! 🙏 To make review easier we've consolidated them into #11001, where your commits are preserved. Closing this in favor of that one. |
This branch was successfully deployed
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.
📝 Description
Adds a practical
sanitizeValueexample to the PinInput documentation.⛳️ Current behavior (updates)
The PinInput API supports sanitizing pasted values before validation, but the documentation does not demonstrate this behavior.
Users copying formatted one-time codes containing spaces or dashes do not have an example showing how to normalize those values.
🚀 New behavior
Adds an example containing a copyable
1-2-3-4code and a four-digit PinInput.The example uses
sanitizeValueto remove non-numeric characters before validation, converting the pasted value to1234.💣 Is this a breaking change (Yes/No):
No.
📝 Additional Information
This is a documentation-only change and does not add any external dependencies.
The documentation-only change appears safe to merge.
Summary
1-2-3-4value and a four-slot PinInput that removes non-digit characters.Reviews (1) · Last reviewed commit: "docs(pin-input): resolve error 'function..."