diff options
| author | Igor Minar | 2011-10-19 21:52:20 -0700 |
|---|---|---|
| committer | Igor Minar | 2011-10-19 21:52:20 -0700 |
| commit | 5d43439dbe764a4c7227f51b34a81b044f13901b (patch) | |
| tree | 38a70cec3be605680f4e46ce83d46f228c85b4e5 /src/widget | |
| parent | a46f2a0db37c88465072d0eec22b0439bf003ff7 (diff) | |
| download | angular.js-5d43439dbe764a4c7227f51b34a81b044f13901b.tar.bz2 | |
fix(ng:pattern): correctly parse out inlined regexp
Diffstat (limited to 'src/widget')
| -rw-r--r-- | src/widget/input.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widget/input.js b/src/widget/input.js index a530b6a8..0defd234 100644 --- a/src/widget/input.js +++ b/src/widget/input.js @@ -732,7 +732,7 @@ angularWidget('input', function(inputElement){ patternMatch = valueFn(true); } else { if (pattern.match(/^\/(.*)\/$/)) { - pattern = new RegExp(pattern.substring(1, pattern.length - 2)); + pattern = new RegExp(pattern.substr(1, pattern.length - 2)); patternMatch = function(value) { return pattern.test(value); } |
