Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Number input with step="0.01" causes form validation false negative result for certain range (1.09-1.16) #15617

Closed
strake7 opened this issue Jan 18, 2017 · 3 comments

Comments

@strake7
Copy link

strake7 commented Jan 18, 2017

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
NG 1.6 form validation concludes that a number input with step="0.01" is invalid when given a passing value in certain ranges. The range of numbers that cause false negative results for the step input is: 1.09-1.16

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

Reproduced at http://codepen.io/nsedley/pen/RKoYJb
The range of numbers to produce the issue is: 1.09-1.16
Step between 1.08 and 1.09 and note that the input and form is falsely marked invalid for 1.09

What is the expected behavior?
Inputting numbers 1.09-1.16 should not cause the NG form validation to mark the input/form as invalid.

What is the motivation / use case for changing the behavior?
To correct it to it's intended functionality.

Which versions of Angular, and which browser / OS are affected by this issue? Did this work in previous versions of Angular? Please also test with the latest stable and snapshot (https://code.angularjs.org/snapshot/) versions.
Reproduced in current Chrome, Edge and Firefox for framework version Angular 1.6, https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.1/angular.js

Other information (e.g. stacktraces, related issues, suggestions how to fix)
Possible cause: https://docs.angularjs.org/guide/migration#migrate1.5to1.6-ng-directives-input%5Bnumber%5D

@strake7
Copy link
Author

strake7 commented Jan 18, 2017

Looks like this was fixed in the 1.6.2 build which is not what I was testing with. Closing issue.

@strake7 strake7 closed this as completed Jan 18, 2017
@strake7
Copy link
Author

strake7 commented Jan 18, 2017

Duplicate of #15504

@lperezp
Copy link

lperezp commented May 23, 2019

Duplicate of #15504

Close issue!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants