vue数据复杂时的表单验证

数据:formData{

    aa:"",

    info:{

      bb:"",

      cc:"",

    }

  }

表单:

<el-form-item prop="info.bb" label="bb">
  <el-input v-model="formData.info.bb" placeholder="请输入邮箱地址"></el-input>
</el-form-item>
验证:password: [{required: true, message: '不能为空', trigger: 'blur'},
     {validator: Verify.validatePassword, trigger: 'blur'}, ], 
   'info.bb' : [{required: true, message: '手机号码不能为空', trigger: 'blur'}],
     'phones[0].model': [{required: true, message: 'model不能为空', trigger: 'blur'}],
--------------------- 本文来自 360linker 的CSDN 博客 ,全文地址请点击:https://blog.csdn.net/belalds/article/details/82428098?utm_source=copy 
 
posted @ 2018-09-26 16:33  哆啦a梦爱吃铜锣烧  阅读(1241)  评论(0编辑  收藏  举报