htmlstreamofficial / preline

Preline UI is an open-source set of prebuilt UI components based on the utility-first Tailwind CSS framework.
https://preline.co
Other
4.9k stars 309 forks source link

Input Number: Validation/rejection bug, or at least inconsistent. #404

Closed oliverhaas closed 4 months ago

oliverhaas commented 4 months ago

Summary

Input Number validation is not consistent, and differs from <input type="number"> .

Steps to Reproduce

Go to the online docs in the provided link and try for example the following inputs:

Demo Link

https://preline.co/docs/input-number.html#maximum-value

Expected Behavior

I expect Input Number to behave the same as the html <input type="number"> does, meaning it rejects non-numerical entries, but allows floats as well as integers.

If Input Number is intended to always be restricted to integers, I would expect it to behave at least consistently, and reject non-integer values, leading zeros, and especially letters etc.

Even only allowing input via the buttons would be fine, if documented properly and if the behavior is consistent.

Actual Behavior

Rejection of non-numerical input is not consistent.

Screenshots

No response

jahaganiev commented 4 months ago

Hey @oliverhaas - our team released v2.4.0 update which addresses this issue. Please update to the latest version and check out. Thanks!