This repository has been archived by the owner on Apr 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27.6k
select
won't work when required
attr is set and option's value is false
#2436
Comments
Just ran into this as per implementation of required directive:
This seems a bit surprising for false to be interpreted as the absence of a model value. What was the rationale? |
Answered my own question, I suppose. required treats false this way to work on checkboxes. Solution is to use a custom parser/formatter on the model and change view value to something not falsey (ie 0) |
As part of our effort to clean out old issues, this issue is being automatically closed since it has been inactivite for over two months. Please try the newest versions of Angular ( Thanks! |
This is still an issue (using v1.1.5). |
Still an issue 1.4 |
Even I am facing the same issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
example of problem
When choose "No",
bValue
is not set tofalse
.required
attr, it work as normally.$scope.options = [{value:1, text:"Yes"}, {value:0, text:"No"}];
works normally.The text was updated successfully, but these errors were encountered: