vue确认密码
rules: {pwd:[{required:true, message:'创建密码',trigger:'blur'}],cpwd:[{required:true,message:'确认密码',trigger:'blur'},{validator:(rule,value,callback)=>{if(value===''){callback(new Error('请再次输入密码'))}else if(value!==this.ruleForm.pwd){callback(new Error('两次输入密码不一致'))}else{callback( )}},trigger:'blur'}]}
本文来自博客园,作者:叶子玉,转载请注明原文链接:https://www.cnblogs.com/knuzy/p/9842397.html