You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/public/javascripts/wechat/directives/form_validate.js

10 lines
302 B

app.directive('pwdconfirm', function(){
return {
require: 'ngModel',
link: function(scope, elm, attrs, ctrl){
ctrl.$validators.pwdconfirm = function(modelValue, viewValue) {
return scope.user && scope.user.password == viewValue;
}
}
}
});