rule.22a721d7.js 1.3 KB

1
  1. import{W as g,q as o,aX as i,a_ as n}from"./index.4d061c66.js";import{u as f}from"./user.9f12eebb.js";const t=/^\d{6}$/,d=/^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)]|[()])+$)(?!^.*[\u4E00-\u9FA5].*$)([^(0-9a-zA-Z)]|[()]|[a-z]|[A-Z]|[0-9]){6,18}$/,u=g({password:[{validator:(s,e,r)=>{e===""?r(new Error(o(i("login.passwordReg")))):r()},trigger:"blur"}],verifyCode:[{validator:(s,e,r)=>{e===""?r(new Error(o(i("login.verifyCodeReg")))):f().verifyCode!==e?r(new Error(o(i("login.verifyCodeCorrectReg")))):r()},trigger:"blur"}]}),w=g({phone:[{validator:(s,e,r)=>{e===""?r(new Error(o(i("login.phoneReg")))):n(e)?r():r(new Error(o(i("login.phoneCorrectReg"))))},trigger:"blur"}],verifyCode:[{validator:(s,e,r)=>{e===""?r(new Error(o(i("login.verifyCodeReg")))):t.test(e)?r():r(new Error(o(i("login.verifyCodeSixReg"))))},trigger:"blur"}]}),E=g({phone:[{validator:(s,e,r)=>{e===""?r(new Error(o(i("login.phoneReg")))):n(e)?r():r(new Error(o(i("login.phoneCorrectReg"))))},trigger:"blur"}],verifyCode:[{validator:(s,e,r)=>{e===""?r(new Error(o(i("login.verifyCodeReg")))):t.test(e)?r():r(new Error(o(i("login.verifyCodeSixReg"))))},trigger:"blur"}],password:[{validator:(s,e,r)=>{e===""?r(new Error(o(i("login.passwordReg")))):d.test(e)?r():r(new Error(o(i("login.passwordRuleReg"))))},trigger:"blur"}]});export{u as l,w as p,E as u};