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.

select won't work when required attr is set and option's value is false #2436

@rexpan

Description

@rexpan

example of problem

<select ng-model="bValue"
          ng-options="o.value as o.text for o in options"
          required></select>
$scope.options = [{value:true, text:"Yes"}, {value:false, text:"No"}];

When choose "No", bValue is not set to false.

  • if remove required attr, it work as normally.
  • the "Yes" option works normally.
  • $scope.options = [{value:1, text:"Yes"}, {value:0, text:"No"}]; works normally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions