You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When input[type="number"] has an attribute step with value of magnitude smaller than approx. 1e-7, the step rule has its value assigned in an exponential form, causing regular expression not to being matched.
Expected behavior
Proper input validation, taking actual number of decimal places into account.
Your environment
jquery-validate
: 1.19.5Current behavior
When
input[type="number"]
has an attributestep
with value of magnitude smaller than approx. 1e-7, thestep
rule has its value assigned in an exponential form, causing regular expression not to being matched.Expected behavior
Proper input validation, taking actual number of decimal places into account.
Live demo
https://jsfiddle.net/ydj8o4nu/
Hotfix proposal
After reconsideration, I see it might not cover all possible cases, but alternate solutions like
toLocaleString
are even more dodgy.The text was updated successfully, but these errors were encountered: