Skip to content
This repository was archived by the owner on Jul 1, 2020. It is now read-only.
This repository was archived by the owner on Jul 1, 2020. It is now read-only.

Incorrect validation on "required" with a value of 0 #177

@mgm09a

Description

@mgm09a

I understand this project is just on life support, and I know that you've mostly moved on to working with other technologies, but I wanted to ask if this odd behavior was by design before I attempted to investigate much further.

http://plnkr.co/edit/t2zzENCdQp163F4IsZH3?p=preview

In this Plunker, you'll find an example of some odd behavior. On my ng-model, the value is initialized to 0. The select element to which it is bound is decorated with validation="required", but the classes that initially get assigned to that element indicate that it is invalid.

I would have expected that a value of 0 would have satisfied the validation="required" rule, but perhaps that was a mistaken assumption.

More interestingly, if I change the selection to another value, then back to 0, the required validation passes. This makes me think that something is not right, as the behavior changes after the element becomes dirty.

Should this behavior remain the same, or should I look into creating a pull request (my first ever) to try and fix it?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions