From 248bd9b7cea7d7262bc6a1eb3472f7cf44f1c022 Mon Sep 17 00:00:00 2001 From: Palak Handa Date: Fri, 31 Aug 2018 13:04:36 +0530 Subject: [PATCH] link validation --- css/custom.css | 9 ++++++++- pages/ambassador.html | 4 ++-- script.js | 43 ++++++++++++++++++++----------------------- 3 files changed, 30 insertions(+), 26 deletions(-) diff --git a/css/custom.css b/css/custom.css index 9498673..17aef78 100644 --- a/css/custom.css +++ b/css/custom.css @@ -221,11 +221,18 @@ .textarea{ min-height: 97px; } -.error-message{ +/*.error-message{ font-weight: inherit; color: #ff0000; margin: 5px 4px -5px 0px; display: none; +}*/ + +.error-message{ + font-weight: inherit; + color: #ff0000; + margin: 7px 4px -5px 26px; + display: none; } /*custom input*/ diff --git a/pages/ambassador.html b/pages/ambassador.html index bd9ad42..90305ec 100644 --- a/pages/ambassador.html +++ b/pages/ambassador.html @@ -155,8 +155,8 @@
web
- - + +
Coupon Code. diff --git a/script.js b/script.js index 44cc0fb..112598f 100644 --- a/script.js +++ b/script.js @@ -1173,33 +1173,30 @@ /*open videos ends here*/ $scope.removeError = function() { - console.log("doooo") $('#invalidEmail').css('display', 'none'); $('#alreadyExist').css('display', 'none'); }; - // $scope.emailcheck = function(val) { - // consol.log("kdsbd") - // $scope.space = /\s/g.test(val); - // console.log("space",$scope.space) - // if (val == undefined) { - // $('#invalidEmail').css('display', 'block'); - // } else { - // $http({ - // method: 'GET', - // url: BASE_URL + '/ambassadors?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}', - // headers: {} - // }).then(function mySuccess(searchResult) { - // console.log("searchResult1===>", searchResult) - // if (searchResult.data.length == 0) { - // $scope.check = false; - // } else { - // $scope.check = true; - // $('#alreadyExist').css('display', 'block'); - // } - // }, function myError(error) {}); - // } - // }; + $scope.emailcheck = function(val) { + if (val == undefined) { + $('#invalidEmail').css('display', 'block'); + } else { + $('#alreadyExist').css('display', 'block'); + // $http({ + // method: 'GET', + // url: BASE_URL + '/ambassadors?filter={"where": {"email": {"like":"%25' + $scope.data.email + '%25"}}}', + // headers: {} + // }).then(function mySuccess(searchResult) { + // console.log("searchResult1===>", searchResult) + // if (searchResult.data.length == 0) { + // $scope.check = false; + // } else { + // $scope.check = true; + // $('#alreadyExist').css('display', 'block'); + // } + // }, function myError(error) {}); + } + }; // $scope.removeNoError = function() { // $('#invalidNumber').css('display', 'none'); -- 2.0.0