FormKit number input native validation error when casting to number by setting number="float"
#1032
sashamilenkovic
started this conversation in
General
Replies: 2 comments 2 replies
-
Well the same is true if you set it to any float value, like .1, or .2 — step and casting are fundamentally different things. I see people are confused on this, but perhaps its more of a docs issue rather than a technical solution |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
HTML number inputs will throw a native validation error when submitting a float:
https://formkit.link/079bded4a052e50851e47c85d7b26adb
Setting
step
toany
avoids that validation error:https://formkit.link/53394a3b41d0c5cf216602e9d46000b6
I'm wondering if when casting the FormKit number input type with prop
number="float
(https://formkit.com/inputs/number#page-container#cast-to-number), it should setstep
toany
by default:https://formkit.link/84094233c71c7515e45d0a6967646d57
Beta Was this translation helpful? Give feedback.
All reactions