From a76de35bb0e6fecf36111b698d9e7ad7fb997235 Mon Sep 17 00:00:00 2001 From: Gustavo Cortez Date: Thu, 12 Jun 2014 11:09:18 -0300 Subject: [PATCH] Fixes validation of input form. Improved error message --- index.html | 7 ++++--- js/directives.js | 10 ++++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/index.html b/index.html index c369e0920..8d286503e 100644 --- a/index.html +++ b/index.html @@ -649,9 +649,10 @@
0) { - if ($rootScope.availableBalance <= vNum) { + if (availableBalanceNum < vNum) { ctrl.$setValidity('enoughAmount', false); - scope.notEnoughAmount = 'Insufficient funds!'; + scope.notEnoughAmount = true; } else { ctrl.$setValidity('enoughAmount', true); scope.notEnoughAmount = null;