diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js
index 6328420f460d..c100d8449412 100644
--- a/src/ng/directive/input.js
+++ b/src/ng/directive/input.js
@@ -1253,9 +1253,9 @@ function checkboxInputType(scope, element, attr, ctrl, $sniffer, $browser, $filt
element[0].checked = ctrl.$viewValue;
};
- // Override the standard `$isEmpty` because a value of `false` means empty in a checkbox.
+ // Override the standard `$isEmpty` because an empty checkbox is always set to `false`
ctrl.$isEmpty = function(value) {
- return value !== trueValue;
+ return value === false;
};
ctrl.$formatters.push(function(value) {
diff --git a/test/ng/directive/inputSpec.js b/test/ng/directive/inputSpec.js
index a239d4511d66..b80ffc067ad5 100644
--- a/test/ng/directive/inputSpec.js
+++ b/test/ng/directive/inputSpec.js
@@ -3623,7 +3623,7 @@ describe('input', function() {
it('should be required if false', function() {
- compileInput('');
+ compileInput('');
browserTrigger(inputElm, 'click');
expect(inputElm[0].checked).toBe(true);
@@ -3633,6 +3633,16 @@ describe('input', function() {
expect(inputElm[0].checked).toBe(false);
expect(inputElm).toBeInvalid();
});
+
+ it('should set the ngTrueValue when required directive is present', function() {
+ compileInput('');
+
+ expect(inputElm).toBeInvalid();
+
+ browserTrigger(inputElm, 'click');
+ expect(inputElm[0].checked).toBe(true);
+ expect(inputElm).toBeValid();
+ });
});