Skip to content

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

Closed
@oliverhaas

Description

@oliverhaas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions