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

Formkit Number in Float mode fails to submit #1299

Closed
Nova38 opened this issue Apr 9, 2024 · 1 comment
Closed

Formkit Number in Float mode fails to submit #1299

Nova38 opened this issue Apr 9, 2024 · 1 comment
Labels
🐛 bug-report Bug is reported, but not verified by team ⛑ Needs triage The issue has not yet been examined by the FormKit team.

Comments

@Nova38
Copy link

Nova38 commented Apr 9, 2024

Reproduction

https://formkit.link/edda9b935fc8f5906b4a5a5902b8fadc

Describe the bug

Formkit Number input fails on submit if the number is a float instead of an int. It says that it needs to be one of the two closest intigers. The replication is from the docs https://formkit.com/inputs/number#cast-to-number with a submit handler enabled.

I

Environment

• OS: windows
• Browser: edge
• Version: 1.6.2

@Nova38 Nova38 added ⛑ Needs triage The issue has not yet been examined by the FormKit team. 🐛 bug-report Bug is reported, but not verified by team labels Apr 9, 2024
@sashamilenkovic
Copy link
Contributor

@Nova38 When using the number attribute to use a float, you need to set the html attribute step to any: https://formkit.link/6cd9f0de75ef445eae2a0fd23ee91540

https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/number#step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug-report Bug is reported, but not verified by team ⛑ Needs triage The issue has not yet been examined by the FormKit team.
Projects
None yet
Development

No branches or pull requests

2 participants