/** @module 常用校验规则 */ import type { VerifyxExp } from './verify.type.js'; export * from './verify.error.js'; export * from './verify.type.js'; /** ## `Verify` 验证信息芸集 @example 配合`zod.rule`实现自定义规则校验 ```ts const rule = zod.rule(Verify.lat_and_lon) assert.equal(zod.checking(rule)([1, 2]).unwrap(), [1, 2]) assert(zod.checking(rule)([]).unwrap_err().instance_of(CheckingError)) ``` */ export type Verify = { /** ### `idcard` : 身份证 */ idcard: VerifyxExp; /** ### `email` : 邮箱 */ email: VerifyxExp; /** ### `number` : 数字 +可转化为数字的`string`,也算数字 */ number: VerifyxExp; /** ### `positive_integer` : 正整数 */ positive_integer: VerifyxExp; /** ### `negative_integer` : 负整数 */ negative_integer: VerifyxExp; /** ### `strong_password` : 强密码 + 必须包含大小写字母和数字的组合,不能使用特殊字符,长度在8-10之间 */ strong_password: VerifyxExp; /** ### `url` : URL */ url: VerifyxExp; /** ### `phone` : 手机号 */ phone: VerifyxExp; /** ### `lat_and_lon` : 经纬度 + [`纬度` , `经度`] */ lat_and_lon: VerifyxExp<[string | number, string | number]>; /** ### `required` : 不为空校验 存在一下情况即为空: + `null` + `undefined` + `''` + `[]` + `{}` */ required: VerifyxExp; /** ### `correct` : 必须为`true`校验 */ correct: VerifyxExp; /** ### `postal` : 邮政编码校验 */ postal: VerifyxExp; }; export declare const Verify: Verify; //# sourceMappingURL=mod.d.ts.map