1
0
Fork 0
management/front/dkha-web-sz-main/node_modules/.cache/babel-loader/02156aee04870cbb3fe4257d4c3...

1 line
19 KiB
JSON
Raw Normal View History

2023-12-18 13:12:25 +08:00
{"remainingRequest":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\utils\\validate.js","dependencies":[{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\src\\utils\\validate.js","mtime":1614735254000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\27446\\Desktop\\up\\front\\dkha-web-sz-main\\node_modules\\babel-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["/**\n * 非零正整数\n * @param {*} s\n */\nexport function isPositiveInteger(s) {\n return '^[1-9]\\d*$';\n}\n/**\n * 邮箱\n * @param {*} \n */\n\nexport function isEmail(rule, value, callback) {\n var regEmail = /^([a-zA-Z0-9._-])+@([a-zA-Z0-9_-])+((.[a-zA-Z0-9_-]{2,3}){1,2})$/;\n\n if (!value) {\n callback(new Error(\"请输入邮箱\"));\n } else if (!regEmail.test(value)) {\n callback(new Error('请输入正确的邮箱'));\n } else {\n callback();\n }\n}\n/**\n * 联系电话\n * @param {*} s\n */\n\nexport function isMobile(rule, value, callback) {\n var regMobile = /^1[0-9]{10}$/;\n\n if (!value) {\n callback(new Error(\"请输入联系电话\"));\n } else if (!regMobile.test(value)) {\n callback(new Error('请输入正确的联系电话'));\n } else {\n callback();\n }\n}\n/**\n * 联系电话\n * @param {*} s\n */\n\nexport function isPhone(rule, value, callback) {\n var regPhone = /^([0-9]{3,4}-)?[0-9]{7,8}$/;\n\n if (!value) {\n callback(new Error(\"请输入联系电话\"));\n } else if (!regPhone.test(value)) {\n callback(new Error('请输入正确的联系电话'));\n } else {\n callback();\n }\n}\n/**\n * URL地址 路由处使用\n * @param {*} s\n */\n\nexport function isURL(s) {\n return /^http[s]?:\\/\\/.*/.test(s);\n}\n/**\n * URL地址 表单验证使用\n * @param {*} s\n */\n\nexport function isgetUrl(rule, value, callback) {\n var regUrl = /^http[s]?:\\/\\/.*/;\n\n if (!value) {\n callback(new Error(\"请输入URL地址\"));\n } else if (!regUrl.test(value)) {\n callback(new Error('请输入正确的URL地址'));\n } else {\n callback();\n }\n}\n/**\n * QQ\n * @param {*} s\n */\n\nexport function isqq(rule, value, callback) {\n var regqq = /^[1-9][0-9]{4,}$/;\n\n if (!value) {\n callback(new Error(\"请输入QQ号码\"));\n } else if (!regqq.test(value)) {\n callback(new Error('请输入正确的QQ号码'));\n } else {\n callback();\n }\n}\n/**\n * 传真号码\n * @param {*} s\n */\n\nexport function ischuanzhen(rule, value, callback) {\n var regCz = /^(\\d{3,4}-)?\\d{7,8}$/;\n\n if (!value) {\n callback(new Error(\"请输入传真号码\"));\n } else if (!regCz.test(value)) {\n callback(new Error('请输入正确的传真号码'));\n } else {\n callback();\n }\n}\n/**\n * 护照\n * @param {*} s\n */\n\nexport function ishuzhao(rule, value, callback) {\n var regHz = /^([a-zA-z]|[0-9]){6,64}$/;\n\n if (!value) {\n callback(new Error(\"请输入护照\"));\n } else if (!regHz.test(value)) {\n callback(new Error('请输入正确的护照'));\n } else {\n callback();\n }\n}\n/**\n * 开始时间大于结束时间\n * @param {*} s\n */\n\nexport function isDate(rule, value, callback) {\n if (!value) {\n callback(new Error(\"请选择时间\"));\n }\n}\n/**\n * 经度\n * @param {*} s\n */\n\nexport function isLong(rule, value, callback) {\n //经度范围:-180.0000~180.0000;\n //let regLong=/^[\\-\\+]?(0?\\d{1,2}\\.\\d{1,5}|1[0-7]?\\d{1}\\.\\d{1,5}|180\\.0{1,5})$/;\n var lngState = -180 <= value && value <= 180;\n\n if (!value) {\n callback(new Error(\"请输入经度\"));\n } else if (!lngState) {\n //callback(new Error('请输入正确的经度'))\n callback(new Error('经度范围有误(-180<=经度<=180)'));\n } else {\n callback();\n }\n}\n/**\n * 纬度\n * @param {*} s\n */\n\nexport function isLat(rule, value, callback) {\n //纬度范围:-90.0