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

fix: CurrencyInput has pattern that does not allow numbers with decimals #2617

Open
1 task done
jeduardo824 opened this issue Jun 4, 2023 · 0 comments
Open
1 task done
Labels
bug Something isn't working

Comments

@jeduardo824
Copy link
Contributor

  • I have searched the issues of this repository and believe that this is not a duplicate.

Describe the bug

PS: I know this component is in Beta state, just reporting to put it on the radar if it is not yet.

The CurrencyInput has a pattern="\d*" (here) that is not allowing numbers with dots or commas.

##Screenshots

image

To Reproduce 🕹

Steps to reproduce the behavior:

  1. Create a form
  2. Use the CurrencyInput component
  3. Digit a number > 999 or with decimal parts
  4. The input validation will raise an error about the format of the number

Expected Behavior 🤔

No error is thrown

Current Behavior 😯

Form validation raises an error asking to provide a value matching the specified format

Context 🔦

Create a form that will ask for the value of something in dollars.

Your Environment 🌎

NextJS application with Formik

Desktop (please complete the following information):

  • OS: MacOS
  • Browser Chrome
  • Version 113

Possible Solution
I don't think this format is needed, so maybe just remove it or create a pattern that allows dots and commas

@jeduardo824 jeduardo824 added the bug Something isn't working label Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant