diff --git a/css/main.css b/css/main.css
index 563f33c23..d9118c0c9 100644
--- a/css/main.css
+++ b/css/main.css
@@ -540,4 +540,8 @@ button[disabled].warning:focus,
height: 50px;
}
+input.ng-invalid-match, input.ng-invalid-match:focus {
+ border-color: red;
+}
+
/*-----------------------------------------------------------------*/
diff --git a/js/directives.js b/js/directives.js
index e5c0502b2..72cd843ce 100644
--- a/js/directives.js
+++ b/js/directives.js
@@ -236,4 +236,20 @@ angular.module('copayApp.directives')
}
])
+ .directive('match', function () {
+ return {
+ require: 'ngModel',
+ restrict: 'A',
+ scope: {
+ match: '='
+ },
+ link: function(scope, elem, attrs, ctrl) {
+ scope.$watch(function() {
+ return (ctrl.$pristine && angular.isUndefined(ctrl.$modelValue)) || scope.match === ctrl.$modelValue;
+ }, function(currentValue) {
+ ctrl.$setValidity('match', currentValue);
+ });
+ }
+ };
+ })
;
diff --git a/views/setup.html b/views/setup.html
index 67aadbb05..f588ea8b6 100644
--- a/views/setup.html
+++ b/views/setup.html
@@ -21,12 +21,21 @@
diff --git a/views/signin.html b/views/signin.html
index efdb6fc85..2959578d9 100644
--- a/views/signin.html
+++ b/views/signin.html
@@ -34,6 +34,13 @@
tooltip-html-unsafe="Password strength:
{{passwordStrength}}
Tip: Use lower and uppercase,
numbers and symbols" tooltip-trigger="focus" required>
+
+
+
« Back