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 ) ;
0 commit comments