<el-form-item prop="repeat_Password" class="userName_color">   
    <el-input 
    type="password"
    placeholder="请再次输入新密码"  
    v-model="loginRuleForm.repeat_Password" 
    maxlength="18"  //设置密码长度
  :show-password="true" //是否查看密码显示
  class="Channel_account"></el-input>
</el-form-item> 
var phoneTest = /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,18}$/;  //校验密码6-18位
if (!phoneTest.test(this.loginRuleForm.userName && this.loginRuleForm.repeat_Password)) {
    this.$message.error('密码须包含数字、字母两种元素,且密码位数为6-16位');
    return false;
}
// 密码为空提示语句
loginRuleForm: { 
    repeat_Password: ''
},
rules: {
    repeat_Password: [
        {required: true, message: '再次输入密码不能为空', trigger: 'blur'}
    ]
},

  

相关文章:

  • 2021-11-06
  • 2022-01-09
  • 2021-12-26
  • 2021-11-14
  • 2022-12-23
  • 2022-12-23
  • 2021-06-11
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案