Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] - InputOtp does not work allowedKeys when using React Hook Form #4329

Open
shlyamster opened this issue Dec 11, 2024 · 1 comment · May be fixed by #4338
Open

[BUG] - InputOtp does not work allowedKeys when using React Hook Form #4329

shlyamster opened this issue Dec 11, 2024 · 1 comment · May be fixed by #4338
Assignees

Comments

@shlyamster
Copy link
Contributor

shlyamster commented Dec 11, 2024

NextUI Version

2.6.8

Describe the bug

The allowedKeys prop in the InputOtp component does not work when using the React Hook Form. Both the default value and custom prop value are not applied.

Your Example Website or App

No response

Steps to Reproduce the Bug or Issue

  1. Go to https://nextui.org/docs/components/input-otp#react-hook-form
  2. Enter an OTP code that does not consist of numerical digits
  3. The example in the screenshot
image

Expected behavior

By default, the allowedKeys parameter is set to ^[0-9]*$. The same behavior is expected when using React Hook Form.

Operating System Version

Any

Browser

Chrome

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 a pull request may close this issue.

2 participants