diff --git a/js/directives.js b/js/directives.js index 03681d02b..ec78dffef 100644 --- a/js/directives.js +++ b/js/directives.js @@ -12,6 +12,11 @@ angular.module('copayApp.directives') require: 'ngModel', link: function(scope, elem, attrs, ctrl) { var validator = function(value) { + // Is payment protocol address? + if (value.indexOf('bitcoin:') === 0 && /r=/.test(value)) { + ctrl.$setValidity('validAddress', true); + return value; + } var a = new Address(value); ctrl.$setValidity('validAddress', a.isValid() && a.network().name === config.networkName); return value;