diff --git a/public/partials/TaxesData/TaxesDataCtrl.js b/public/partials/TaxesData/TaxesDataCtrl.js index 6241126..2f67456 100644 --- a/public/partials/TaxesData/TaxesDataCtrl.js +++ b/public/partials/TaxesData/TaxesDataCtrl.js @@ -8,7 +8,7 @@ appControllers.controller('TaxesDataCtrl', ['$scope', 'TaxesDataFactory', functi // check to make sure the form is completely valid if (isValid) { TaxesDataFactory.postTax(user).then(function(result){ - alert(JSON.stringify(result.data)); + alert("Post data: \n" + JSON.stringify(result.data)); }); } else { @@ -20,8 +20,16 @@ appControllers.controller('TaxesDataCtrl', ['$scope', 'TaxesDataFactory', functi 'Solteiro','Casado','Divorciado','Viúvo','Outro' ]; + $scope.validateTelefone = function($value){ + if($value > 0 || $value ==''){ + return true; + } else { + return false; + } + }; - $scope.validateNif = function($value){ + + $scope.validateNif = function($value){ if(typeof $value == "undefined" || $value == ''){ return true; } diff --git a/public/partials/TaxesData/tax-pessoa.html b/public/partials/TaxesData/tax-pessoa.html index 857d2af..ece9032 100644 --- a/public/partials/TaxesData/tax-pessoa.html +++ b/public/partials/TaxesData/tax-pessoa.html @@ -10,6 +10,19 @@ + +
Introduza um telefone válido.
+