|
1 | 1 | /*! |
2 | | - * vue-validator v2.1.0 |
| 2 | + * vue-validator v2.1.1 |
3 | 3 | * (c) 2016 kazuya kawaguchi |
4 | 4 | * Released under the MIT License. |
5 | 5 | */ |
@@ -429,6 +429,7 @@ var PRIORITY_VALIDATE = 16; |
429 | 429 | var PRIORITY_VALIDATE_CLASS = 32; |
430 | 430 | var REGEX_FILTER = /[^|]\|[^|]/; |
431 | 431 | var REGEX_VALIDATE_DIRECTIVE = /^v-validate(?:$|:(.*)$)/; |
| 432 | +var REGEX_EVENT = /^v-on:|^@/; |
432 | 433 |
|
433 | 434 | var classId = 0; // ID for validation class |
434 | 435 |
|
@@ -833,7 +834,7 @@ var BaseValidation = function () { |
833 | 834 | return; |
834 | 835 | } |
835 | 836 |
|
836 | | - _this.handleValidate(el, _this._initial); |
| 837 | + _this.handleValidate(el, { noopable: _this._initial }); |
837 | 838 | if (_this._initial) { |
838 | 839 | _this._initial = null; |
839 | 840 | } |
@@ -1742,7 +1743,7 @@ var SelectValidation = function (_BaseValidation) { |
1742 | 1743 | return; |
1743 | 1744 | } |
1744 | 1745 |
|
1745 | | - _this2.handleValidate(el, _this2._initial); |
| 1746 | + _this2.handleValidate(el, { noopable: _this2._initial }); |
1746 | 1747 | if (_this2._initial) { |
1747 | 1748 | _this2._initial = null; |
1748 | 1749 | } |
@@ -1797,8 +1798,6 @@ var SelectValidation = function (_BaseValidation) { |
1797 | 1798 | return SelectValidation; |
1798 | 1799 | }(BaseValidation); |
1799 | 1800 |
|
1800 | | -var eventRE = /^v-on:|^@/; |
1801 | | - |
1802 | 1801 | /** |
1803 | 1802 | * Validator class |
1804 | 1803 | */ |
@@ -1857,8 +1856,8 @@ var Validator$1 = function () { |
1857 | 1856 | var attrs = this._dir.el.attributes; |
1858 | 1857 | for (var i = 0, l = attrs.length; i < l; i++) { |
1859 | 1858 | var event = attrs[i].name; |
1860 | | - if (eventRE.test(event)) { |
1861 | | - event = event.replace(eventRE, ''); |
| 1859 | + if (REGEX_EVENT.test(event)) { |
| 1860 | + event = event.replace(REGEX_EVENT, ''); |
1862 | 1861 | this._events[this._getEventName(event)] = this._dir.vm.$eval(attrs[i].value, true); |
1863 | 1862 | } |
1864 | 1863 | } |
@@ -2588,7 +2587,7 @@ function plugin(Vue) { |
2588 | 2587 | Validate(Vue); |
2589 | 2588 | } |
2590 | 2589 |
|
2591 | | -plugin.version = '2.1.0'; |
| 2590 | +plugin.version = '2.1.1'; |
2592 | 2591 |
|
2593 | 2592 | if (typeof window !== 'undefined' && window.Vue) { |
2594 | 2593 | window.Vue.use(plugin); |
|
0 commit comments