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

step attribute doesn't trigger validity classes #10597

Closed

Description

@Mouvedia

When you are using step="1" a float value enables validity.stepMismatch. This is not reflected by the ng classes on the input.
e.g.

<input ng-model="example" type="number" step="1" />

steps to reproduce:

  1. enter a float value
  2. check validity.stepMismatch of the input (true)
  3. check lack of ng-invalid class on the input

Affected version: 1.3.5

Activity

  1. pkozlowski-opensource commented on Dec 29, 2014

    @pkozlowski-opensource
    Member

    @Mouvedia it is next to impossible to assist you based on the info provided (or rather - lack of info...). Please provide a minimal, runnable reproduce scenario using http://plnkr.co/ or similar as per contribution guidelines

  2. Mouvedia commented on Dec 29, 2014

    @Mouvedia
    Author

    Ill update with more info. But it's pretty descriptive already.

  3. pkozlowski-opensource commented on Dec 29, 2014

    @pkozlowski-opensource
    Member

    But it's pretty descriptive already.

    Yeh, might be for someone that sits in front of the code that exhibits the issue, but is far from being obvious for people not having exactly the same context as you have. For example, how can we guess what is the AngularJS version you are using?

  4. pkozlowski-opensource commented on Dec 29, 2014

    @pkozlowski-opensource
    Member

    Anyway, provide a live reproduce scenario using plunker and you will have a response in no time

  5. Mouvedia commented on Dec 29, 2014

    @Mouvedia
    Author

    @pkozlowski-opensource Seems no one will touch this for months now that you have put it in the "Purgatory" so Ill just use a custom validator to compensate for this obvious omission.

  6. pkozlowski-opensource commented on Dec 29, 2014

    @pkozlowski-opensource
    Member

    @Mouvedia we put things in the purgatory milestone by default where there is no enough info to confirm / reproduce the issue. It happens quite often, unfortunately, that people don't provide adequate info and don't come back to us after we request more info - we need a way of tracking those issues.

    Now, if you want to speed up this issue resolution you can do one of those (which will be needed to fix the issue anyway):

    • send a pull request with a fix
    • check if the issue is still present in the latest version of AngularJS (once again, a plunker would avoid those back-and-forth)

    You are welcomed to do any work-around on your side but if you want to see things improving on the core it would be great if you could send us a PR with a fix if you've investigated the issue already and qualified it as omission.

  7. modified the milestones: , Purgatory on Dec 29, 2014
  8. Mouvedia commented on Dec 29, 2014

    @Mouvedia
    Author

    I can't imagine how much more strict you must be concerning PRs. So Ill just post the fix that Ill come up with when I am done.

  9. caitp commented on Dec 29, 2014

    @caitp
    Contributor

    Pawel, number and range inputs use the step attribute to rewrite inputs to be multiples of a given step value. We don't have handled for this for the number our range types, and when native validators are used, we ignore the step mismatch flags. That is the bug they're talking about

  10. 7 remaining items

  11. jimmywarting commented on Sep 6, 2015

    @jimmywarting
    Contributor

    Should work on date month week datetime datetime-local time range number

  12. added 2 commits that reference this issue on Aug 16, 2016
    94528bd
    132698a
  13. added a commit that references this issue on Aug 17, 2016
    c0b42f0
  14. added a commit that references this issue on Sep 21, 2016
    e51c33a
  15. added 7 commits that reference this issue on Nov 21, 2016
    910878e
    3917a05
    7090406
    fa88003
    e1e452a
    a679ca6
    8ace661
  16. added a commit that references this issue on Nov 25, 2016
    cfd0c1d
  17. added a commit that references this issue on Sep 28, 2024
    e1da4be
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions