We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dc48aad commit 8b33d34Copy full SHA for 8b33d34
src/ng/directive/validators.js
@@ -43,8 +43,8 @@ var patternDirective = function() {
43
ctrl.$validate();
44
});
45
46
- ctrl.$validators.pattern = function(value) {
47
- return ctrl.$isEmpty(value) || isUndefined(regexp) || regexp.test(value);
+ ctrl.$validators.pattern = function(modelValue, viewValue) {
+ return ctrl.$isEmpty(viewValue) || isUndefined(regexp) || regexp.test(viewValue);
48
};
49
}
50
0 commit comments