ng-required validation not working properly with true/false radio values. #2594
Description
See Fiddle.
I have a use case where radio input data is stored server-side as booleans - true for "yes", false for "no".
If I use value="true"
and value="false"
on my form, the radio control corresponding to the default value is not selected when the page loads (validation, however, works as expected).
If I use ng-value="true"
and ng-value="false"
instead, the default value is selected automatically based on the model as expected, but validation doesn't work correctly. The form is only declared valid if "Yes" is selected, but still invalid if "No" is selected.
I can't select "no" by default because the business rules say that the inputs should initially be unselected (presumably so the user has to actually go through the whole form and answer the questions instead of just skipping ahead because an option has already been selected for them).