Allow users to enter out-of-bound numbers, outside of the `minimumValue` and `maximumValue` range
See original GitHub issueCurrently, if a user sets the minimumValue
option to a value superior to zero, it effectively prevent him to delete the input value, since it would mean the rawValue
would be equal to 0
.
While this is exactly what the minimumValue
option is for, I see a use case where users would want to be able to temporarily clear the element, in order to type their valid values.
Allowing this will bring some side effects:
- First, the
rawValue
will be updated with a potential incorrect out of range value while the user is typing it (the user would then need to manage those error cases), - Second, we would need to allow not only the value
0
, but any values between0
and theminimumValue
- For instance this means that if we have a
minimumValue
set to1234
, then we would need to allow the user to type1
,12
and123
before finally accepting the correct value1234
.
- For instance this means that if we have a
To that end, we would need to create a new option overrideMinimumValueLimitation
(or something equivalent) set to false
by default, that would allow a user to input values between 0
and minimumValue
in the element, and would then revert to the last good known value on blur if it’s still equal out of range.
This seems not trivial.
Issue Analytics
- State:
- Created 6 years ago
- Comments:23 (10 by maintainers)
Top Results From Across the Web
Restrict input type="number" to its min or max if it is out of range
Actually input type=number only handles and not allows user to submit the form if the entered number is not in range.
Read more >Easy Number and Currency Formatting Library - autoNumeric
Allow users to enter out-of-bound numbers, outside of the `minimumValue` and `maximumValue` range. v4.5.13 (2020-02-16). Bugs fixed.
Read more >CWE-839: Numeric Range Comparison Without Minimum Check
However, this method only verifies that the given array index is less than the maximum length of the array but does not check...
Read more >https://www.cfa.harvard.edu/atmosphere/Instruments...
Metadata Name: GranuleDay Mandatory: T Data Type: HE5T_NATIVE_INT Number of Values: 1 Minimum Value: 1 Maximum Value: 31 Data Source: PGE Description: The ......
Read more >Input Output Reference - EnergyPlus
1.1 What's different about EnergyPlus Input and Output? ... 1.10.45 Surface Output Variables (exterior heat transfer surfaces) .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Great, I think the documentation is still missing the new option http://autonumeric.org/configurator @AlexandreBonneau
It took 2 years, but it’s finally here 😉
The latest AutoNumeric version
4.6.0
integrates the new'invalid'
option for theoverrideMinMaxLimits
setting. Using that will allow you to solve your problem.