diff options
Diffstat (limited to 'src/directive')
| -rw-r--r-- | src/directive/input.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/directive/input.js b/src/directive/input.js index 1a3acd01..7b95baaf 100644 --- a/src/directive/input.js +++ b/src/directive/input.js @@ -847,7 +847,7 @@ var NgModelController = ['$scope', '$exceptionHandler', '$attrs', 'ngModel', value = formatters[idx](value); } - if (isDefined(value) && ctrl.viewValue !== value) { + if (ctrl.viewValue !== value) { ctrl.viewValue = value; ctrl.render(); } @@ -1042,7 +1042,7 @@ var requiredDirective = [function() { if (!ctrl) return; var validator = function(value) { - if (attr.required && isEmpty(value)) { + if (attr.required && (isEmpty(value) || value === false)) { ctrl.setValidity('REQUIRED', false); return null; } else { |
