Skip to content

docs(pin-input): add sanitize value example - #10991

Closed
salehghotbani wants to merge 2 commits into
chakra-ui:mainfrom
salehghotbani:docs/pin-input-sanitize-value
Closed

salehghotbani wants to merge 2 commits into
chakra-ui:mainfrom
salehghotbani:docs/pin-input-sanitize-value

Conversation

@salehghotbani

@salehghotbani salehghotbani commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

📝 Description

Adds a practical sanitizeValue example 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-4 code and a four-digit PinInput.

The example uses sanitizeValue to remove non-numeric characters before validation, converting the pasted value to 1234.

💣 Is this a breaking change (Yes/No):

No.

📝 Additional Information

This is a documentation-only change and does not add any external dependencies.

RetriggerConfidence Score: 5/5

The documentation-only change appears safe to merge.

Summary

  • Adds a copyable 1-2-3-4 value and a four-slot PinInput that removes non-digit characters.
  • Adds a “Sanitize Pasted Values” section to the PinInput documentation.

Reviews (1) · Last reviewed commit: "docs(pin-input): resolve error 'function..."

@changeset-bot

changeset-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: e2a9160

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
chakra-ui-storybook Ready Ready Preview Sep 10, 2026 7:24pm UTC
chakra-v3-docs Ready Ready Preview Sep 10, 2026 7:24pm UTC

Request Review

@Adebesin-Cell

Copy link
Copy Markdown
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

2 active deployments
Preview – chakra-v3-docs e2a91601 Deployed Sep 10, 2026 by vercel[bot]
Preview – chakra-ui-storybook e2a91601 Deployed Sep 10, 2026 by vercel[bot]
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.

2 participants