How does vue.js+element-ui, proactively trigger a rules for authentication?

there are two controls in the form, which use rules and prop to verify the validity:
el-select
el-input
el-select will change the range of legal values in el-input. When a legal number has been entered in el-input and the user modifies the option in el-select, how to trigger el-input to re-detect legitimacy and prompt illegal input?

    sysdiskSize: [
      { required: true, message: "", trigger: "blur", type: "number" },
      { validator: validateSysDiskSize, trigger: "blur" }
    ],
Mar.17,2021

use the validateField method. For example, to verify the attribute whose prop is' aaa', the ref of form is' fromName',. Use the following:
this.refs.formName.validateField ('aaa');


there is an attribute in the

document that validate-on-rule-change should meet your needs, described as

.
whether to trigger validation immediately after the rules property changes

the code you put on verifies el-input ? If so, change trigger: 'blur' to trigger:' blur, change' , and change


to wrap two components in one form, bind change listener to el-select , and then trigger input verification

through the validate method of form when you choose to change.
Menu