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.

ngMinlength/ngMaxlength broken on input type=number #7967

Closed

Description

@sijmenvos

The angular minlength of a number input isn't working as of Angular 1.3.0 beta 12.

I've created the bug in plunker:
http://plnkr.co/edit/vF3DMsbqIbm7EZbSvfQT?p=preview

Activity

  1. caitp commented on Jun 24, 2014

    @caitp
    Contributor

    can confirm, @matsko this broke with the changes to the attributes / aliasing, I believe. I'm not sure we ever figured out how we wanted maxlength to work for non-text input types, but maybe it's good enough to just convert the value to a string if it's a number?

    (but yeah, why not use min/max instead of minlength/maxlength for numbers?)

  2. caitp commented on Jun 24, 2014

    @caitp
    Contributor

    view value, or stringified model value? I dunno.

  3. sijmenvos commented on Jun 24, 2014

    @sijmenvos
    Author

    In my case I need it to be id's that can could also be 0008373 or something, but I see this is not possible because the model value removes the zeroes in front. I'll use a text input with a regex instead in my case.

    The min/max will indeed satisfy for a minimum length of a number (value).

    Thanks for the quick answer.

  4. added this to the milestone on Jul 15, 2014
  5. added a commit that references this issue on Aug 28, 2014
    7faa60c
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