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.
input [checkbox] ng-true-value="1" required - never validates #4681
Closed
Description
Following changes from 1.2rc2 to 1.2rc3, the behaviour of the checkbox has changed.
An element:
<input type="checkbox" ng-model="terms" ng-true-value="1" required>Check me</input>
Is not valid when it is checked. The function on the checkboxInputType controller function:
ctrl.$isEmpty = function(value) {
return value !== trueValue;
};
Is getting passed value=true when the checkbox is checked. Therefore, the required validation is failing. (true !== "1" is true).
Browser: Chrome & FireFox (latest builds)