Problems with custom verification rules for Vue project elementUI

what is the reason why the form cannot be submitted and no error is reported after writing custom verification rules?
ask God for advice! Wait on the line!

clipboard.png

clipboard.png

clipboard.png

Feb.27,2021

details are a little hard to find, so it's best to break the debug yourself.


your (if else if else) after verification needs to call another callback ()


I also encountered the same problem. At last, I found out that
add a sentence callback ()
to the end of the custom method, that is,

.
var validatePass = (rule, value, callbcak) => {
  if() {
  }
  else {
  }
  // 
  callback();  // OK
}

callback estimation is used because asynchronous check can be implemented in this way

Menu