{"remainingRequest":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\babel-loader\\lib\\index.js!C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\src\\utils\\newValidate.js","dependencies":[{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\src\\utils\\newValidate.js","mtime":1663828782935},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\babel.config.js","mtime":1663828782900},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"C:\\Users\\100zone\\Desktop\\baizong\\community\\SmartCommunity\\videoSurveillance\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000}],"contextDependencies":[],"result":["import _defineProperty from \"C:/Users/100zone/Desktop/baizong/community/SmartCommunity/videoSurveillance/node_modules/@babel/runtime/helpers/esm/defineProperty.js\";\nimport \"core-js/modules/es6.regexp.constructor\";\n\nvar _getSetting$null$carN;\n\n/*\r\n * @Author: chenlong (陈龙)\r\n * @Date: 2019-10-24 18:11:07\r\n * @LastEditors: zwy\r\n * @LastEditTime: 2021-05-27 09:12:30\r\n * @Description: 表单校验方法\r\n */\n\n/* eslint-disable */\nvar regExps = {\n carNumber: {\n // 车牌校验\n regExp: /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1,2}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/,\n msg: '车牌格式有误'\n },\n domainName: {\n // 域名校验\n regExp: /^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$/,\n msg: '域名格式有误'\n },\n int: {\n // 包含0的正整数校验\n regExp: /^([1-9]\\d*|0{1})$/,\n msg: '该项为正整数'\n },\n price: {\n // 最多4位小数的价格校验\n regExp: /^(0{1}|[1-9]\\d*)(?:\\.\\d{1,4})?$/,\n msg: '价格格式有误,最多保留4位小数'\n },\n phone: {\n // 手机号校验\n regExp: /^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|147)\\d{8}$/,\n msg: '手机号码格式有误'\n },\n email: {\n // 邮箱校验\n regExp: /^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$/,\n msg: '邮箱地址格式有误'\n },\n tel: {\n // 联系电话校验\n regExp: /^((0\\d{2,3}-\\d{7,8})|((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|147)\\d{8})$/,\n msg: '联系电话格式有误'\n },\n card: {\n // 身份证校验\n regExp: /^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|[xX])$/,\n msg: '身份证格式有误'\n },\n passport: {\n // 护照\n regExp: /^[a-zA-Z0-9]{3,21}$/,\n msg: '护照格式有误'\n },\n officer: {\n // 军官证或士兵证\n regExp: /^[a-zA-Z0-9]{7,21}$/,\n msg: '军官证格式有误'\n },\n hours: {\n // 时分校验\n regExp: /^(([0,1]\\d{1})|2[0,1,2,3]{1}|\\d{1}):[0,1,2,3,4,5]\\d{1}$/,\n msg: '时分输入格式有误'\n },\n hoursNocolon: {\n // 不带冒号时分校验\n regExp: /^(([0,1]\\d{1})|2[0,1,2,3]{1}|\\d{1})[0,1,2,3,4,5]\\d{1}$/,\n msg: '请输入不带冒号的时分格式'\n },\n percentage: {\n // 百分数验证\n regExp: /^\\d+\\%$/,\n msg: '请输入百分数'\n },\n legalString: {\n // 中文、英文字母、数字、下划线和中划线\n regExp: /^[\\u4E00-\\u9FA5A-Za-z0-9_-]+$/,\n msg: '由中文、英文字母、数字、下划线和中划线组成'\n }\n};\nexport default (_getSetting$null$carN = {\n getSetting: function getSetting() {\n return {\n message: '该项不能为空.',\n required: true,\n trigger: 'blur',\n validator: function validator() {}\n };\n },\n // 为空校验\n null: function _null(value) {\n var regExp = /^\\s*$/g;\n\n if (regExp.test(value) || 'undefined' == typeof value || null == value) {\n return '该项不能为空';\n }\n },\n // 车牌校验\n carNumber: function carNumber(value) {\n var regExp = /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1,2}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;\n return !regExp.test(value) && '车牌格式有误';\n },\n // 域名校验\n domainName: function domainName(value) {\n var regExp = /^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$/;\n return !regExp.test(value) && '域名格式有误';\n },\n // 包含0的正整数校验\n int: function int(value) {\n var regExp = /^([1-9]\\d*|0{1})$/;\n return !regExp.test(value) && '该项为正整数';\n },\n // 最多4位小数的价格校验\n price: function price(value) {\n var regExp = /^(0{1}|[1-9]\\d*)(?:\\.\\d{1,4})?$/;\n return !regExp.test(value) && '价格格式有误,最多保留4位小数';\n },\n // 手机号校验\n phone: function phone(value) {\n var regExp = /^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|147)\\d{8}$/;\n return !regExp.test(value) && '您输入格式有误,请重新输入';\n },\n // 联系电话校验\n tel: function tel(value) {\n var regExp = /^((0\\d{2,3}-\\d{7,8})|((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|147)\\d{8})$/;\n return !regExp.test(value) && '联系电话格式有误';\n },\n // 身份证校验\n card: function card(value) {\n var regExp = /^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|[xX])$/;\n return !regExp.test(value) && '身份证格式有误';\n },\n // 时分校验\n hours: function hours(value) {\n var regExp = /^(([0,1]\\d{1})|2[0,1,2,3]{1}|\\d{1}):[0,1,2,3,4,5]\\d{1}$/;\n return !regExp.test(value) && '时分输入格式有误';\n },\n // 不带冒号时分校验\n hoursNocolon: function hoursNocolon(value) {\n var regExp = /^(([0,1]\\d{1})|2[0,1,2,3]{1}|\\d{1})[0,1,2,3,4,5]\\d{1}$/;\n return !regExp.test(value) && '请输入不带冒号的时分格式';\n },\n // 百分数验证\n percentage: function percentage(value) {\n var regExp = /^\\d+\\%$/;\n return !regExp.test(value) && '请输入百分数';\n },\n legalString: function legalString(value) {\n var regExp = /^[\\u4E00-\\u9FA5A-Za-z0-9_-]+$/;\n return !regExp.test(value) && '由中文、英文字母、数字、下划线和中划线组成';\n },\n\n /*\r\n 初始化校验\r\n arg为需要校验项的数组集合,需要优先校验项放在最后\r\n */\n init: function init(arg) {\n var _this = this;\n\n var set = this.getSetting();\n\n set.validator = function (rule, value, callback) {\n var i = arg.length,\n err;\n\n while (i--) {\n err = _this[arg[i]](value);\n if (err) break;\n }\n\n if (err) {\n rule.message = err;\n callback(new Error(''));\n } else {\n callback();\n }\n };\n\n return [Object.assign({}, set)];\n },\n\n /*\r\n 为必填校验\r\n */\n noRequired: function noRequired(arg) {\n var _this2 = this;\n\n var set = this.getSetting();\n set.required = false;\n\n set.validator = function (rule, value, callback) {\n if (value) {\n var i = arg.length,\n err;\n\n while (i--) {\n err = _this2[arg[i]](value);\n if (err) break;\n }\n\n if (err) {\n rule.message = err;\n callback(new Error(''));\n } else {\n callback();\n }\n } else {\n callback();\n }\n };\n\n return [Object.assign({}, set)];\n },\n // 自定义校验\n custome: function custome(params) {\n return [Object.assign({}, this.getSetting(), params)];\n },\n\n /*\r\n 正则校验\r\n reg正则表达式\r\n msg提示消息\r\n required是否为必填,不传为不必填,传值则根据required的Boolean值来确定\r\n */\n reg: function reg(_reg, msg, required) {\n var self = this;\n return [Object.assign({}, this.getSetting(), {\n required: Boolean(required),\n message: msg,\n validator: function validator(rule, value, callback) {\n if (rule.required) {\n if (self.null(value)) {\n callback(new Error(''));\n } else {\n if (_reg.test(value)) {\n callback();\n } else {\n callback(new Error(''));\n }\n }\n } else {\n if (self.null(value)) {\n callback();\n } else {\n if (_reg.test(value)) {\n callback();\n } else {\n callback(new Error(''));\n }\n }\n }\n }\n })];\n },\n // 1以上的正整数\n cameraChannel: function cameraChannel() {\n var required = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var pattern = /^[1-9]/,\n message = '请输入除了0的数字';\n return {\n required: required,\n pattern: pattern,\n message: message,\n trigger: 'blur'\n };\n },\n //数字、大小写字母和下划线(50位以内)\n limitVideoNumber: function limitVideoNumber() {\n var required = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var pattern = /^\\w{0,50}$/,\n message = '不能超过50位';\n return {\n required: required,\n pattern: pattern,\n message: message,\n trigger: 'blur'\n };\n },\n //限制50位以内\n limitVideo: function limitVideo() {\n var required = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var pattern = /^.{1,50}$/,\n message = '不能超过50位';\n return {\n required: required,\n pattern: pattern,\n message: message,\n trigger: 'blur'\n };\n },\n //数字、大小写字母和下划线(20位以内)\n limitVideoNumber20: function limitVideoNumber20() {\n var required = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var pattern = /^([\\u4E00-\\uFA29]|[\\uE7C7-\\uE7F3]|[a-zA-Z0-9_()()]){1,20}$/,\n message = '不能超过20位';\n return {\n required: required,\n pattern: pattern,\n message: message,\n trigger: 'blur'\n };\n },\n\n /**\r\n * @description: 输入框校验\r\n * @param {String}: name: 名称:label\r\n * @return {Object}: Object\r\n * @author: chenlong (陈龙)\r\n */\n inputRequired: function inputRequired() {\n var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '名称';\n return {\n required: true,\n message: \"\\u8BF7\\u8F93\\u5165\".concat(name),\n trigger: 'blur'\n };\n },\n //匹配版本号*.*.*\n versionRegular: function versionRegular() {\n var required = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var pattern = /^([1-9]\\d+|[1-9])(\\.([1-9]\\d+|\\d)){2}$/,\n message = '请输入除了0开头x.x.x的格式';\n return {\n pattern: pattern,\n message: message,\n trigger: 'blur'\n };\n },\n\n /**\r\n * @description: 选择框校验\r\n * @param {String}: name: 名称:label\r\n * @param {String}: msg: 自定义提示\r\n * @return {Object}: Object\r\n * @author: chenlong (陈龙)\r\n */\n selectRequired: function selectRequired() {\n var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '名称';\n var msg = arguments.length > 1 ? arguments[1] : undefined;\n return {\n required: true,\n message: msg || \"\\u8BF7\\u9009\\u62E9\".concat(name),\n trigger: 'change'\n };\n },\n\n /**\r\n * @description: 正则表达式\r\n * @param {RegExp || String}: reg 正则表达式 | regExps里面的正则类型\r\n * @param {String}: msg 校验错误提示\r\n * @return {Object}: Object\r\n * @author: chenlong (陈龙)\r\n */\n pattern: function pattern(reg, msg) {\n var pattern = /^[\\u4E00-\\u9FA5A-Za-z0-9_-]+$/,\n message = '由中文、英文字母、数字、下划线和中划线组成';\n\n if (reg instanceof RegExp) {\n pattern = reg;\n message = msg || '您输入格式有误,请重新输入';\n } else if (typeof reg == 'string' && regExps[reg]) {\n pattern = regExps[reg] && regExps[reg].regExp;\n message = msg || '您输入格式有误,请重新输入' || regExps[reg] && regExps[reg].msg;\n }\n\n return {\n pattern: pattern,\n message: message,\n trigger: 'blur'\n };\n },\n\n /**\r\n * @description: 选择框校验\r\n * @param {Number}: min: 最小长度\r\n * @param {Number}: max: 最大长度\r\n * @return {Object}: Object\r\n * @author: chenlong (陈龙)\r\n */\n lengthRange: function lengthRange() {\n var min = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 2;\n var max = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 50;\n var required = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n return {\n required: required,\n min: min,\n max: max,\n message: \"\\u957F\\u5EA6\\u5728 \".concat(min, \" \\u5230 \").concat(max, \" \\u4E2A\\u5B57\\u7B26\"),\n trigger: 'blur'\n };\n }\n}, _defineProperty(_getSetting$null$carN, \"custome\", function custome(params) {\n return [Object.assign({}, this.getSetting(), params)];\n}), _defineProperty(_getSetting$null$carN, \"patternPhone\", function patternPhone() {\n var required = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var pattern = /^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|147|191)\\d{8}$/,\n message = '您输入的手机号有误';\n return {\n required: required,\n pattern: pattern,\n message: message,\n trigger: 'blur'\n };\n}), _defineProperty(_getSetting$null$carN, \"patternPhoneNumber\", function patternPhoneNumber() {\n var required = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n var pattern = /^(1[3|4|5|6|7|8|9])\\d{9}$|^0\\d{2,3}-?\\d{6,8}$/,\n // let pattern = /(0\\d{2,3}-\\d{7,8})|(1[3-9]\\d{9})/,\n message = '您输入的手机号有误';\n return {\n required: required,\n pattern: pattern,\n message: message,\n trigger: 'blur'\n };\n}), _getSetting$null$carN);",{"version":3,"sources":["C:/Users/100zone/Desktop/baizong/community/SmartCommunity/videoSurveillance/src/utils/newValidate.js"],"names":["regExps","carNumber","regExp","msg","domainName","int","price","phone","email","tel","card","passport","officer","hours","hoursNocolon","percentage","legalString","getSetting","message","required","trigger","validator","null","value","test","init","arg","set","rule","callback","i","length","err","Error","Object","assign","noRequired","custome","params","reg","self","Boolean","cameraChannel","pattern","limitVideoNumber","limitVideo","limitVideoNumber20","inputRequired","name","versionRegular","selectRequired","RegExp","lengthRange","min","max"],"mappings":";;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA;AACA,IAAMA,OAAO,GAAG;AACZC,EAAAA,SAAS,EAAE;AACP;AACAC,IAAAA,MAAM,EAAE,kFAFD;AAGPC,IAAAA,GAAG,EAAE;AAHE,GADC;A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AAIwB,OAAO,GAAG,wFAAd;AAAA,MACIzB,OAAO,GAAG,WADd;AAEA,SAAO;AAAEC,IAAAA,QAAQ,EAARA,QAAF;AAAYwB,IAAAA,OAAO,EAAPA,OAAZ;AAAqBzB,IAAAA,OAAO,EAAPA,OAArB;AAA8BE,IAAAA,OAAO,EAAE;AAAvC,GAAP;AACH,CA1PL,8FA4PwC;AAAA,MAAjBD,QAAiB,uEAAN,IAAM;AAChC,MAAIwB,OAAO,GAAG,+CAAd;AAAA,MACI;AACAzB,EAAAA,OAAO,GAAG,WAFd;AAGA,SAAO;AAAEC,IAAAA,QAAQ,EAARA,QAAF;AAAYwB,IAAAA,OAAO,EAAPA,OAAZ;AAAqBzB,IAAAA,OAAO,EAAPA,OAArB;AAA8BE,IAAAA,OAAO,EAAE;AAAvC,GAAP;AACH,CAjQL","sourcesContent":["/*\r\n * @Author: chenlong (陈龙)\r\n * @Date: 2019-10-24 18:11:07\r\n * @LastEditors: zwy\r\n * @LastEditTime: 2021-05-27 09:12:30\r\n * @Description: 表单校验方法\r\n */\r\n/* eslint-disable */\r\nconst regExps = {\r\n carNumber: {\r\n // 车牌校验\r\n regExp: /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1,2}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/,\r\n msg: '车牌格式有误'\r\n },\r\n domainName: {\r\n // 域名校验\r\n regExp: /^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$/,\r\n msg: '域名格式有误'\r\n },\r\n int: {\r\n // 包含0的正整数校验\r\n regExp: /^([1-9]\\d*|0{1})$/,\r\n msg: '该项为正整数'\r\n },\r\n price: {\r\n // 最多4位小数的价格校验\r\n regExp: /^(0{1}|[1-9]\\d*)(?:\\.\\d{1,4})?$/,\r\n msg: '价格格式有误,最多保留4位小数'\r\n },\r\n phone: {\r\n // 手机号校验\r\n regExp: /^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|147)\\d{8}$/,\r\n msg: '手机号码格式有误'\r\n },\r\n email: {\r\n // 邮箱校验\r\n regExp: /^\\w+([-+.]\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*$/,\r\n msg: '邮箱地址格式有误'\r\n },\r\n tel: {\r\n // 联系电话校验\r\n regExp: /^((0\\d{2,3}-\\d{7,8})|((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|147)\\d{8})$/,\r\n msg: '联系电话格式有误'\r\n },\r\n card: {\r\n // 身份证校验\r\n regExp: /^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|[xX])$/,\r\n msg: '身份证格式有误'\r\n },\r\n passport: {\r\n // 护照\r\n regExp: /^[a-zA-Z0-9]{3,21}$/,\r\n msg: '护照格式有误'\r\n },\r\n officer: {\r\n // 军官证或士兵证\r\n regExp: /^[a-zA-Z0-9]{7,21}$/,\r\n msg: '军官证格式有误'\r\n },\r\n hours: {\r\n // 时分校验\r\n regExp: /^(([0,1]\\d{1})|2[0,1,2,3]{1}|\\d{1}):[0,1,2,3,4,5]\\d{1}$/,\r\n msg: '时分输入格式有误'\r\n },\r\n hoursNocolon: {\r\n // 不带冒号时分校验\r\n regExp: /^(([0,1]\\d{1})|2[0,1,2,3]{1}|\\d{1})[0,1,2,3,4,5]\\d{1}$/,\r\n msg: '请输入不带冒号的时分格式'\r\n },\r\n percentage: {\r\n // 百分数验证\r\n regExp: /^\\d+\\%$/,\r\n msg: '请输入百分数'\r\n },\r\n legalString: {\r\n // 中文、英文字母、数字、下划线和中划线\r\n regExp: /^[\\u4E00-\\u9FA5A-Za-z0-9_-]+$/,\r\n msg: '由中文、英文字母、数字、下划线和中划线组成'\r\n }\r\n};\r\nexport default {\r\n getSetting() {\r\n return {\r\n message: '该项不能为空.',\r\n required: true,\r\n trigger: 'blur',\r\n validator() {}\r\n };\r\n },\r\n // 为空校验\r\n null(value) {\r\n let regExp = /^\\s*$/g;\r\n if (regExp.test(value) || 'undefined' == typeof value || null == value) {\r\n return '该项不能为空';\r\n }\r\n },\r\n // 车牌校验\r\n carNumber(value) {\r\n let regExp =\r\n /^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1,2}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$/;\r\n return !regExp.test(value) && '车牌格式有误';\r\n },\r\n // 域名校验\r\n domainName(value) {\r\n let regExp = /^(?=^.{3,255}$)[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})+$/;\r\n return !regExp.test(value) && '域名格式有误';\r\n },\r\n // 包含0的正整数校验\r\n int(value) {\r\n let regExp = /^([1-9]\\d*|0{1})$/;\r\n return !regExp.test(value) && '该项为正整数';\r\n },\r\n // 最多4位小数的价格校验\r\n price(value) {\r\n let regExp = /^(0{1}|[1-9]\\d*)(?:\\.\\d{1,4})?$/;\r\n return !regExp.test(value) && '价格格式有误,最多保留4位小数';\r\n },\r\n // 手机号校验\r\n phone(value) {\r\n let regExp = /^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|147)\\d{8}$/;\r\n return !regExp.test(value) && '您输入格式有误,请重新输入';\r\n },\r\n // 联系电话校验\r\n tel(value) {\r\n let regExp = /^((0\\d{2,3}-\\d{7,8})|((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|147)\\d{8})$/;\r\n return !regExp.test(value) && '联系电话格式有误';\r\n },\r\n // 身份证校验\r\n card(value) {\r\n let regExp = /^\\d{6}(18|19|20)?\\d{2}(0[1-9]|1[012])(0[1-9]|[12]\\d|3[01])\\d{3}(\\d|[xX])$/;\r\n return !regExp.test(value) && '身份证格式有误';\r\n },\r\n // 时分校验\r\n hours(value) {\r\n let regExp = /^(([0,1]\\d{1})|2[0,1,2,3]{1}|\\d{1}):[0,1,2,3,4,5]\\d{1}$/;\r\n return !regExp.test(value) && '时分输入格式有误';\r\n },\r\n // 不带冒号时分校验\r\n hoursNocolon(value) {\r\n let regExp = /^(([0,1]\\d{1})|2[0,1,2,3]{1}|\\d{1})[0,1,2,3,4,5]\\d{1}$/;\r\n return !regExp.test(value) && '请输入不带冒号的时分格式';\r\n },\r\n // 百分数验证\r\n percentage(value) {\r\n let regExp = /^\\d+\\%$/;\r\n return !regExp.test(value) && '请输入百分数';\r\n },\r\n legalString(value) {\r\n const regExp = /^[\\u4E00-\\u9FA5A-Za-z0-9_-]+$/;\r\n return !regExp.test(value) && '由中文、英文字母、数字、下划线和中划线组成';\r\n },\r\n /*\r\n\t初始化校验\r\n\targ为需要校验项的数组集合,需要优先校验项放在最后\r\n\t*/\r\n init(arg) {\r\n let set = this.getSetting();\r\n set.validator = (rule, value, callback) => {\r\n let i = arg.length,\r\n err;\r\n while (i--) {\r\n err = this[arg[i]](value);\r\n if (err) break;\r\n }\r\n if (err) {\r\n rule.message = err;\r\n callback(new Error(''));\r\n } else {\r\n callback();\r\n }\r\n };\r\n return [Object.assign({}, set)];\r\n },\r\n\r\n /*\r\n\t为必填校验\r\n\t */\r\n noRequired(arg) {\r\n let set = this.getSetting();\r\n set.required = false;\r\n set.validator = (rule, value, callback) => {\r\n if (value) {\r\n let i = arg.length,\r\n err;\r\n while (i--) {\r\n err = this[arg[i]](value);\r\n if (err) break;\r\n }\r\n if (err) {\r\n rule.message = err;\r\n callback(new Error(''));\r\n } else {\r\n callback();\r\n }\r\n } else {\r\n callback();\r\n }\r\n };\r\n return [Object.assign({}, set)];\r\n },\r\n // 自定义校验\r\n custome(params) {\r\n return [Object.assign({}, this.getSetting(), params)];\r\n },\r\n /*\r\n\t正则校验\r\n\treg正则表达式\r\n\tmsg提示消息\r\n\trequired是否为必填,不传为不必填,传值则根据required的Boolean值来确定\r\n\t*/\r\n reg(reg, msg, required) {\r\n let self = this;\r\n return [\r\n Object.assign({}, this.getSetting(), {\r\n required: Boolean(required),\r\n message: msg,\r\n validator(rule, value, callback) {\r\n if (rule.required) {\r\n if (self.null(value)) {\r\n callback(new Error(''));\r\n } else {\r\n if (reg.test(value)) {\r\n callback();\r\n } else {\r\n callback(new Error(''));\r\n }\r\n }\r\n } else {\r\n if (self.null(value)) {\r\n callback();\r\n } else {\r\n if (reg.test(value)) {\r\n callback();\r\n } else {\r\n callback(new Error(''));\r\n }\r\n }\r\n }\r\n }\r\n })\r\n ];\r\n },\r\n // 1以上的正整数\r\n cameraChannel(required = true) {\r\n let pattern = /^[1-9]/,\r\n message = '请输入除了0的数字';\r\n return { required, pattern, message, trigger: 'blur' };\r\n },\r\n //数字、大小写字母和下划线(50位以内)\r\n limitVideoNumber(required = true) {\r\n let pattern = /^\\w{0,50}$/,\r\n message = '不能超过50位';\r\n return { required, pattern, message, trigger: 'blur' };\r\n },\r\n //限制50位以内\r\n limitVideo(required = true) {\r\n let pattern = /^.{1,50}$/,\r\n message = '不能超过50位';\r\n return { required, pattern, message, trigger: 'blur' };\r\n },\r\n //数字、大小写字母和下划线(20位以内)\r\n limitVideoNumber20(required = true) {\r\n let pattern = /^([\\u4E00-\\uFA29]|[\\uE7C7-\\uE7F3]|[a-zA-Z0-9_()()]){1,20}$/,\r\n message = '不能超过20位';\r\n return { required, pattern, message, trigger: 'blur' };\r\n },\r\n /**\r\n * @description: 输入框校验\r\n * @param {String}: name: 名称:label\r\n * @return {Object}: Object\r\n * @author: chenlong (陈龙)\r\n */\r\n inputRequired(name = '名称') {\r\n return { required: true, message: `请输入${name}`, trigger: 'blur' };\r\n },\r\n //匹配版本号*.*.*\r\n versionRegular(required = true) {\r\n let pattern = /^([1-9]\\d+|[1-9])(\\.([1-9]\\d+|\\d)){2}$/,\r\n message = '请输入除了0开头x.x.x的格式';\r\n return { pattern, message, trigger: 'blur' };\r\n },\r\n /**\r\n * @description: 选择框校验\r\n * @param {String}: name: 名称:label\r\n * @param {String}: msg: 自定义提示\r\n * @return {Object}: Object\r\n * @author: chenlong (陈龙)\r\n */\r\n selectRequired(name = '名称', msg) {\r\n return { required: true, message: msg || `请选择${name}`, trigger: 'change' };\r\n },\r\n /**\r\n * @description: 正则表达式\r\n * @param {RegExp || String}: reg 正则表达式 | regExps里面的正则类型\r\n * @param {String}: msg 校验错误提示\r\n * @return {Object}: Object\r\n * @author: chenlong (陈龙)\r\n */\r\n pattern(reg, msg) {\r\n let pattern = /^[\\u4E00-\\u9FA5A-Za-z0-9_-]+$/,\r\n message = '由中文、英文字母、数字、下划线和中划线组成';\r\n if (reg instanceof RegExp) {\r\n pattern = reg;\r\n message = msg || '您输入格式有误,请重新输入';\r\n } else if (typeof reg == 'string' && regExps[reg]) {\r\n pattern = regExps[reg] && regExps[reg].regExp;\r\n message = msg || '您输入格式有误,请重新输入' || (regExps[reg] && regExps[reg].msg);\r\n }\r\n return { pattern, message, trigger: 'blur' };\r\n },\r\n /**\r\n * @description: 选择框校验\r\n * @param {Number}: min: 最小长度\r\n * @param {Number}: max: 最大长度\r\n * @return {Object}: Object\r\n * @author: chenlong (陈龙)\r\n */\r\n lengthRange(min = 2, max = 50, required = true) {\r\n return { required, min, max, message: `长度在 ${min} 到 ${max} 个字符`, trigger: 'blur' };\r\n },\r\n // 自定义校验\r\n custome(params) {\r\n return [Object.assign({}, this.getSetting(), params)];\r\n },\r\n\r\n // 手机号校验\r\n patternPhone(required = true) {\r\n let pattern = /^((13[0-9])|(14[5,7])|(15[0-3,5-9])|(17[0,3,5-8])|(18[0-9])|166|198|199|147|191)\\d{8}$/,\r\n message = '您输入的手机号有误';\r\n return { required, pattern, message, trigger: 'blur' };\r\n },\r\n // 手机号校验\r\n patternPhoneNumber(required = true) {\r\n let pattern = /^(1[3|4|5|6|7|8|9])\\d{9}$|^0\\d{2,3}-?\\d{6,8}$/,\r\n // let pattern = /(0\\d{2,3}-\\d{7,8})|(1[3-9]\\d{9})/,\r\n message = '您输入的手机号有误';\r\n return { required, pattern, message, trigger: 'blur' };\r\n }\r\n};\r\n"]}]}