An error was reported when submitting validation using the element ui form

clipboard.png


methods:{
  applyFree(formName){ 
      let _this = this;
     _this.$refs.formName.validate((valid) => {
     if (valid) {
      debugger;
     } else {
       return false;
     }
    }
  }
    
     -sharp-sharp

read it for yourself.
anyway < el-form ref= "formName" > bind the corresponding ref
method corresponding to this.$refs.formName.validate.


methods:{
  applyFree(formName){ 
      let _this = this;
     _this.$refs.formName.validate((valid) => { /*_this.$refs.formName_this.$refs[formName]*/
     if (valid) {
      debugger;
     } else {
       return false;
     }
    }
  }
Menu