Skip to content
This repository was archived by the owner on Dec 25, 2017. It is now read-only.

Commit 4214870

Browse files
committed
✨ release(patch): v2.1.3
1 parent 312a000 commit 4214870

8 files changed

+35
-19
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
<a name="2.1.3"></a>
2+
## [2.1.3](https://github.com/vuejs/vue-validator/compare/v2.1.2...v2.1.3) (2016-05-29)
3+
4+
5+
### :bug: Bug Fixes
6+
7+
* **validate:** fix multi element fragment bug ([312a000](https://github.com/vuejs/vue-validator/commit/312a000)), closes [#243](https://github.com/vuejs/vue-validator/issues/243)
8+
9+
10+
111
<a name="2.1.2"></a>
212
## [2.1.2](https://github.com/vuejs/vue-validator/compare/v2.1.1...v2.1.2) (2016-05-21)
313

dist/vue-validator.common.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-validator v2.1.2
2+
* vue-validator v2.1.3
33
* (c) 2016 kazuya kawaguchi
44
* Released under the MIT License.
55
*/
@@ -650,7 +650,7 @@ function Validate (Vue) {
650650

651651
this.field = camelize(this.arg ? this.arg : params.field);
652652

653-
this.validation = validator.manageValidation(this.field, model, this.vm, this.frag.node, this._scope, filters, params.initial, this.isDetectBlur(params.detectBlur), this.isDetectChange(params.detectChange));
653+
this.validation = validator.manageValidation(this.field, model, this.vm, this.getElementFrom(this.frag), this._scope, filters, params.initial, this.isDetectBlur(params.detectBlur), this.isDetectChange(params.detectChange));
654654

655655
isPlainObject(params.classes) && this.validation.setValidationClasses(params.classes);
656656

@@ -661,7 +661,7 @@ function Validate (Vue) {
661661
listen: function listen() {
662662
var model = this.model;
663663
var validation = this.validation;
664-
var el = this.frag.node;
664+
var el = this.getElementFrom(this.frag);
665665

666666
this.onBlur = bind(validation.listener, validation);
667667
on(el, 'blur', this.onBlur);
@@ -684,7 +684,7 @@ function Validate (Vue) {
684684
}
685685
},
686686
unlisten: function unlisten() {
687-
var el = this.frag.node;
687+
var el = this.getElementFrom(this.frag);
688688

689689
if (this.onInput) {
690690
off(el, 'input', this.onInput);
@@ -708,7 +708,7 @@ function Validate (Vue) {
708708
},
709709
teardownValidate: function teardownValidate() {
710710
if (this.validator && this.validation) {
711-
var el = this.frag.node;
711+
var el = this.getElementFrom(this.frag);
712712

713713
this.params.group && this.validator.removeGroupValidation(this.params.group, this.field);
714714

@@ -781,6 +781,9 @@ function Validate (Vue) {
781781
}
782782
}
783783
return ret;
784+
},
785+
getElementFrom: function getElementFrom(frag) {
786+
return frag.single ? frag.node : frag.node.nextSibling;
784787
}
785788
});
786789
}
@@ -2587,7 +2590,7 @@ function plugin(Vue) {
25872590
Validate(Vue);
25882591
}
25892592

2590-
plugin.version = '2.1.2';
2593+
plugin.version = '2.1.3';
25912594

25922595
if (typeof window !== 'undefined' && window.Vue) {
25932596
window.Vue.use(plugin);

dist/vue-validator.js

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* vue-validator v2.1.2
2+
* vue-validator v2.1.3
33
* (c) 2016 kazuya kawaguchi
44
* Released under the MIT License.
55
*/
@@ -654,7 +654,7 @@ var validators = Object.freeze({
654654

655655
this.field = camelize(this.arg ? this.arg : params.field);
656656

657-
this.validation = validator.manageValidation(this.field, model, this.vm, this.frag.node, this._scope, filters, params.initial, this.isDetectBlur(params.detectBlur), this.isDetectChange(params.detectChange));
657+
this.validation = validator.manageValidation(this.field, model, this.vm, this.getElementFrom(this.frag), this._scope, filters, params.initial, this.isDetectBlur(params.detectBlur), this.isDetectChange(params.detectChange));
658658

659659
isPlainObject(params.classes) && this.validation.setValidationClasses(params.classes);
660660

@@ -665,7 +665,7 @@ var validators = Object.freeze({
665665
listen: function listen() {
666666
var model = this.model;
667667
var validation = this.validation;
668-
var el = this.frag.node;
668+
var el = this.getElementFrom(this.frag);
669669

670670
this.onBlur = bind(validation.listener, validation);
671671
on(el, 'blur', this.onBlur);
@@ -688,7 +688,7 @@ var validators = Object.freeze({
688688
}
689689
},
690690
unlisten: function unlisten() {
691-
var el = this.frag.node;
691+
var el = this.getElementFrom(this.frag);
692692

693693
if (this.onInput) {
694694
off(el, 'input', this.onInput);
@@ -712,7 +712,7 @@ var validators = Object.freeze({
712712
},
713713
teardownValidate: function teardownValidate() {
714714
if (this.validator && this.validation) {
715-
var el = this.frag.node;
715+
var el = this.getElementFrom(this.frag);
716716

717717
this.params.group && this.validator.removeGroupValidation(this.params.group, this.field);
718718

@@ -785,6 +785,9 @@ var validators = Object.freeze({
785785
}
786786
}
787787
return ret;
788+
},
789+
getElementFrom: function getElementFrom(frag) {
790+
return frag.single ? frag.node : frag.node.nextSibling;
788791
}
789792
});
790793
}
@@ -2591,7 +2594,7 @@ var validators = Object.freeze({
25912594
Validate(Vue);
25922595
}
25932596

2594-
plugin.version = '2.1.2';
2597+
plugin.version = '2.1.3';
25952598

25962599
if (typeof window !== 'undefined' && window.Vue) {
25972600
window.Vue.use(plugin);

dist/vue-validator.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/en/installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ See [dist folder](https://github.com/vuejs/vue-validator/tree/dev/dist). Note th
99
### jsdelivr
1010

1111
```html
12-
<script src="https://cdn.jsdelivr.net/vue.validator/2.1.2/vue-validator.min.js"></script>
12+
<script src="https://cdn.jsdelivr.net/vue.validator/2.1.3/vue-validator.min.js"></script>
1313
```
1414

1515
## NPM

docs/zh-cn/installation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
### jsdelivr
1010

1111
```html
12-
<script src="https://cdn.jsdelivr.net/vue.validator/2.1.2/vue-validator.min.js"></script>
12+
<script src="https://cdn.jsdelivr.net/vue.validator/2.1.3/vue-validator.min.js"></script>
1313
```
1414

1515
## NPM

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vue-validator",
33
"description": "Validator component for Vue.js",
4-
"version": "2.1.2",
4+
"version": "2.1.3",
55
"author": {
66
"name": "kazuya kawaguchi",
77
"email": "[email protected]"

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function plugin (Vue, options = {}) {
3030
Validate(Vue)
3131
}
3232

33-
plugin.version = '2.1.2'
33+
plugin.version = '2.1.3'
3434

3535
export default plugin
3636

0 commit comments

Comments
 (0)