From 0c428e3fb9087b9697640cfeea24d450103b972d Mon Sep 17 00:00:00 2001 From: Caitlin Potter Date: Sat, 22 Mar 2014 22:39:47 -0400 Subject: [PATCH] fix(input): don't perform HTML5 validation on updated model-value Running html5-validation immediately after model-value is updated is incorrect, because the view has not updated, and HTML5 constraint validation has not adjusted. This should be properly fixed later on by performing html5 validation after the view value is updated, and a comment has been left to address this in the future. Closes #6796 --- src/ng/directive/input.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ng/directive/input.js b/src/ng/directive/input.js index cb432c52a5c7..65d9aea01ae5 100644 --- a/src/ng/directive/input.js +++ b/src/ng/directive/input.js @@ -874,7 +874,7 @@ function addNativeHtml5Validators(ctrl, validatorName, element) { return value; }; ctrl.$parsers.push(validator); - ctrl.$formatters.push(validator); + // TODO: perform HTML5 validation after $formatters are run and $viewValue updated } }