From b2a8a089b6c31c8ff176c2483f659caae4f71afb Mon Sep 17 00:00:00 2001 From: Misko Hevery Date: Thu, 11 Feb 2010 09:57:42 -0800 Subject: make validator more leniant for errors which are false instead of null --- src/Widgets.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/Widgets.js b/src/Widgets.js index 6eb2acc3..4f359e91 100644 --- a/src/Widgets.js +++ b/src/Widgets.js @@ -239,7 +239,7 @@ TextController.prototype = { } if (this.lastErrorText !== errorText) { this.lastErrorText = isValidationError; - if (errorText !== null && isVisible(view)) { + if (errorText && isVisible(view)) { view.setAttribute('ng-error', errorText); scope.markInvalid(this); } -- cgit v1.2.3