El-select verification is invalid in el-form-item. Checkbox-group chooses one result and selects all the results.

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?

Mar.19,2021

turns out to be a problem with the data type of config. It must be an array, and I define an object, but this does not report an error. Since the type is mandatory, it does not throw an error.


<el-checkbox-group v-model="formData.config">

the formData.config in this must be an array initial value must be an array

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3871c-2b890.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3871c-2b890.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?