Explorar el Código

Form: fix support for dot-separated rule key

Leopoldthecoder hace 7 años
padre
commit
4392a036d1
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      packages/form/src/form-item.vue

+ 1 - 1
packages/form/src/form-item.vue

@@ -230,7 +230,7 @@
         var selfRules = this.rules;
         var requiredRule = this.required !== undefined ? { required: !!this.required } : [];
 
-        formRules = formRules ? getPropByPath(formRules, this.prop || '').v : [];
+        formRules = formRules ? getPropByPath(formRules, this.prop || '').o[this.prop || ''] : [];
 
         return [].concat(selfRules || formRules || []).concat(requiredRule);
       },