rule.9287b9d2.js 1.8 KB

1
  1. import{Z as F,aX as i,ad as t,a_ as o}from"./index.js";const B=/^\d{6}$/,s=/^[0-9A-Za-z]{6,18}$/;F({username:[{validator(e,r,u){r?i(r)?u():u(new Error("\u624B\u673A\u53F7\u683C\u5F0F\u4E0D\u6B63\u786E")):u(new Error("\u8BF7\u8F93\u5165\u624B\u673A\u53F7"))},trigger:"blur"}],password:[{validator:(e,r,u)=>{r===""?u(new Error("\u8BF7\u8F93\u5165\u5BC6\u7801")):s.test(r)?u():u(new Error("\u5BC6\u7801\u683C\u5F0F\u5E94\u4E3A6-18\u4F4D\u6570\u5B57\u3001\u5B57\u6BCD\u7684\u7EC4\u5408"))},trigger:"blur"}],verifyCode:[{validator:(e,r,u)=>{r===""?u(new Error("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801")):t().verifyCode!==r?u(new Error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u9A8C\u8BC1\u7801")):u()},trigger:"blur"}]});const C=F({phone:[{validator:(e,r,u)=>{r===""?u(new Error("\u8BF7\u8F93\u5165\u624B\u673A\u53F7\u7801")):o(r)?u():u(new Error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801\u683C\u5F0F"))},trigger:"blur"}],verifyCode:[{validator:(e,r,u)=>{r===""?u(new Error("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801")):B.test(r)?u():u(new Error("\u8BF7\u8F93\u51656\u4F4D\u6570\u5B57\u9A8C\u8BC1\u7801"))},trigger:"blur"}]}),n=F({phone:[{validator:(e,r,u)=>{r===""?u(new Error("\u8BF7\u8F93\u5165\u624B\u673A\u53F7\u7801")):o(r)?u():u(new Error("\u8BF7\u8F93\u5165\u6B63\u786E\u7684\u624B\u673A\u53F7\u7801\u683C\u5F0F"))},trigger:"blur"}],verifyCode:[{validator:(e,r,u)=>{r===""?u(new Error("\u8BF7\u8F93\u5165\u9A8C\u8BC1\u7801")):B.test(r)?u():u(new Error("\u8BF7\u8F93\u51656\u4F4D\u6570\u5B57\u9A8C\u8BC1\u7801"))},trigger:"blur"}],password:[{validator:(e,r,u)=>{r===""?u(new Error("\u8BF7\u8F93\u5165\u5BC6\u7801")):s.test(r)?u():u(new Error("\u5BC6\u7801\u683C\u5F0F\u5E94\u4E3A8-18\u4F4D\u6570\u5B57\u3001\u5B57\u6BCD\u3001\u7B26\u53F7\u7684\u4EFB\u610F\u4E24\u79CD\u7EC4\u5408"))},trigger:"blur"}]});export{s as R,C as p,n as u};