I have a form form, and there is no problem with prop, el-input validation set for every el-form-item, but el-select validation does not work, and there is also a problem with el-checkbox-group selection
both el-select and el-checkbox-group have child elements, so it"s likely that el-form-item "s prop doesn"t work with this type of structure.
Code:
<el-form :model="formData" :rules="formRules" ref="formData">
<el-form-item label="" prop="description" :label-width=""150px"">
<el-input v-model="formData.description" auto-complete="off"></el-input>
</el-form-item>
<el-form-item label="--" prop="category" :label-width=""150px"">
<el-select v-model="formData.category" placeholder="" @change="selectList">
<el-option
v-for="item in fields.category"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="--checkbox" prop="config" :label-width=""150px"">
<el-checkbox-group v-model="formData.config">
<el-checkbox v-for="(item, key) in configFieldList" :label="item" name="config" :key="key">{{item}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-form>
I can use validateField to verify the select above, but what should I do with checkbox-group?