import{c as s}from"./index-D4Ne4xf-.js";const{t:o}=s(),d=()=>({required:t=>({required:!0,message:t||o("common.required")}),lengthRange:t=>{const{min:n,max:e,message:r}=t;return{min:n,max:e,message:r||o("common.lengthRange",{min:n,max:e})}},notSpace:t=>({validator:(n,e,r)=>{(e==null?void 0:e.indexOf(" "))!==-1?r(new Error(t||o("common.notSpace"))):r()}}),notSpecialCharacters:t=>({validator:(n,e,r)=>{/[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/gi.test(e)?r(new Error(t||o("common.notSpecialCharacters"))):r()}}),isUrl:t=>({validator:(n,e,r)=>{/^(http|https):\/\/(\S+)$/.test(e||"")?r():r(new Error(t||"链接地址错误"))}})});export{d as u};
