表单验证
https://blog.csdn.net/zhangkegu/article/details/88398384
<el-form :model="item" ref="rForm" :rules="paramsForm.paramsRules" > <el-table :data="item.quotas" tooltip-effect="dark" style="width: 100%" border > <el-table-column :show-overflow-tooltip="true" prop="quotaName" label="考核指标" min-width="120" > <template slot-scope="scope"> <el-form-item v-if="scope.row.quotaOriginType != 1 && isSee != 1" :prop="'quotas.' + scope.$index + '.quotaName'" :rules="paramsForm.addLinerules.quotaName" > <el-input v-model="scope.row.quotaName"
paramsForm: { setTableData: [], addLinerules: { quotaName: [ { required: true, message: "考核指标必填", trigger: "blur" }, { max: 50, message: "字符长度应小于50个", }, ], quotaPoint: [ { required: true, message: "考核要点及内容必填", trigger: "blur" }, { max: 500, message: "字符长度应小于500个", }, ], quotaStandard: [ { required: true, message: "评分标准必填", trigger: "blur" }, { max: 1000, message: "字符长度应小于1000个", }, ],
单层遍历