elementui el-cascader表单校验不生效

<el-form :model="form" :rules="rules" ref="form">
<el-form-item label="单位" prop="organizationList">
 <el-cascader v-model="form.organizationList"  :options="compOption"  :props="{ multiple: false,checkStrictly: false}"  collapse-tags clearable/>
el-form-item>
el-form>
data(){
  const validateOrg = (rule, value, callback) => { 
      if (!this.value.length) {
        callback(new Error('单位不能为空'))
      } else {
        callback()
      }
    }
  return {
    rules:{
     organizationList: [{ type: 'array', required: true, validator: validateOrg }],
    }
  }
}

你可能感兴趣的:(ElementUI,elementui,vue.js,javascript)