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

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

Closed
oliverhaas opened this issue Jul 10, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@oliverhaas
Copy link

oliverhaas commented Jul 10, 2024

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:

  • 0.1 will rejected and set to 0
  • 02 will not be rejected
  • 2.323 will not be rejected
  • 5.12sdffa2 will not be rejected

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

@oliverhaas oliverhaas changed the title Input Number: Validation bug, or at least inconsistent. Input Number: Validation/rejection bug, or at least inconsistent. Jul 10, 2024
@jahaganiev jahaganiev added the bug Something isn't working label Jul 22, 2024
@jahaganiev
Copy link
Member

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

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

2 participants