-
Notifications
You must be signed in to change notification settings - Fork 0
/
validator.min.js
1 lines (1 loc) · 6.35 KB
/
validator.min.js
1
!function(t,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.jxmValidator=n():t.jxmValidator=n()}("undefined"!=typeof self?self:this,function(){return function(t){var n={};function r(e){if(n[e])return n[e].exports;var i=n[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=n,r.d=function(t,n,e){r.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:e})},r.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(n,"a",n),n},r.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},r.p="",r(r.s=20)}([function(t,n,r){var e=r(4),i=r(5);t.exports=function(t){return i(e.OBJECT,t)}},function(t,n){t.exports={POSITIVE_NUMBER_REX:/^[1-9]\d*(\.\d*)?$|^0?\.\d*[1-9]\d*$/,NEGATIVE_NUMBER_REX:/^-[1-9]\d*(\.\d*)?$|^-0?\.\d*[1-9]\d*$/,INTEGER_REX:/^-?\d+$/,POSITIVE_INTEGER_REX:/^[1-9]\d*$/,NEGATIVE_INTEGER_REX:/^-[1-9]\d*$/,UN_POSITIVE_INTEGER_REX:/^-[1-9]\d*$|^0$/,UN_NEGATIVE_INTEGER_REX:/^[1-9]\d*$|^0$/,LEFT_WHITE_SPACE_REX:/^\s\s*/,RIGHT_WHITE_SPACE_REX:/\s\s*$/,TELEPHONE_REX:{"zh-CN":/^(0[0-9]{2,3}\-)?([2-9][0-9]{6,7})+(\-[0-9]{1,4})?$/},MOBILE_REX:{"zh-CN":/^(\+?0?86-?)?1\d{10}$/},EMAIL_REX:/^[a-zA-Z0-9]+([._\\-]*[a-zA-Z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$/,IPV4_REX:/\b((?!\d\d\d)\d+|1\d\d|2[0-4]\d|25[0-5])\.((?!\d\d\d)\d+|1\d\d|2[0-4]\d|25[0-5])\.((?!\d\d\d)\d+|1\d\d|2[0-4]\d|25[0-5])\.((?!\d\d\d)\d+|1\d\d|2[0-4]\d|25[0-5])\b/}},function(t,n,r){var e=r(4),i=r(5);t.exports=function(t){return typeof t===e.NUMBER||i(e.NUMBER,t)}},function(t,n,r){var e=r(4),i=r(5);t.exports=function(t){return typeof t===e.STRING||i(e.STRING,t)}},function(t,n){var r={};["NULL","UNDEFINED","BOOLEAN","NUMBER","STRING","SYMBOL","OBJECT","ARRAY","SET","MAP","WEAKSET","WEAKMAP","FUNCTION","DATE"].forEach(t=>{r[t]=t.toLowerCase()}),t.exports=r},function(t,n){var r,e=null,i="[object Null]",o="[object Undefined]",u=/^\[object\u0020|\]$/gi,s=Object.prototype.toString;t.exports=function(t,n){return(n===r?o:n===e?i:s.call(n)).replace(u,"").toLowerCase()===t}},function(t,n,r){var e=r(8),i=r(2),o=r(0),u=r(10);t.exports=function(t,n){var r=o(n)?n:{};return i(t)?!e(t):!(!0===r.isStrict||!u(t,{isStrict:!0})||e(t-0))}},function(t,n,r){var e=r(0),i=r(2),o=r(6);t.exports=function(t,n){var r=e(n)?n:{};return i(t)?t-0==0:!0!==r.isStrict&&o(t)&&t-0==0}},function(t,n){t.exports=function(t){return t!=t}},function(t,n){var r=1/0,e=-1/0;t.exports=function(t){return t===r||t===e}},function(t,n,r){var e=r(3),i=r(0);t.exports=function(t,n){var r=i(n)?n:{};return!!e(t)&&(!1===r.isStrict?""!==t:""!==t.trim())}},function(t,n,r){var e=r(6),i=r(9);t.exports=function(t,n){return e(t,n)&&!i(t)}},function(t,n,r){var e=r(2),i=r(0),o=r(1);t.exports=function(t,n){return!0===(i(n)?n:{}).isStrict?e(t)&&o.POSITIVE_NUMBER_REX.test(t):o.POSITIVE_NUMBER_REX.test(t)}},function(t,n,r){var e=r(2),i=r(0),o=r(1);t.exports=function(t,n){return!0===(i(n)?n:{}).isStrict?e(t)&&o.NEGATIVE_NUMBER_REX.test(t):o.NEGATIVE_NUMBER_REX.test(t)}},function(t,n,r){var e=r(4),i=r(5);t.exports=function(t){return i(e.ARRAY,t)}},function(t,n,r){var e=r(0),i=r(16);t.exports=function(t){if(!e(t))return!1;var n=Object.getPrototypeOf(t);if(null===n)return!0;var r=n.constructor;return i(r)}},function(t,n,r){var e=r(4),i=r(5);t.exports=function(t){return i(e.FUNCTION,t)}},function(t,n,r){var e=r(3),i=r(18),o=r(1);t.exports=function(t,n){var r=e(n)?n:i.ZHCN,u=o.MOBILE_REX[r];return!!u&&!!e(t)&&u.test(t)}},function(t,n){t.exports={ZHCN:"zh-CN"}},function(t,n,r){var e=r(3),i=r(18),o=r(1);t.exports=function(t,n){var r=e(n)?n:i.ZHCN,u=o.TELEPHONE_REX[r];return!!u&&!!e(t)&&u.test(t)}},function(t,n,r){var e=r(21),i=r(22),o=r(23),u=r(24),s=r(8),E=r(9),c=r(2),f=r(6),a=r(11),N=r(7),p=r(25),I=r(12),R=r(13),d=r(26),_=r(27),v=r(28),x=r(29),T=r(30),l=r(31),S=r(32),O=r(3),X=r(33),A=r(10),G=r(14),U=r(34),P=r(0),b=r(15),V=r(35),m=r(16),y=r(17),g=r(19),B=r(36),M=r(37),$=r(38);t.exports={isUndefined:e,isNull:i,isNil:o,isBoolean:u,isNaN:s,isInfinity:E,isNumber:c,isRealNumber:f,isNumeric:a,isZero:N,isUnZero:p,isPositiveNumber:I,isNegativeNumber:R,isUnPositiveNumber:d,isUnNegativeNumber:_,isInteger:v,isPositiveInteger:x,isNegativeInteger:T,isUnPositiveInteger:l,isUnNegativeInteger:S,isString:O,isEmptyString:X,isUnEmptyString:A,isArray:G,isEmptyArray:U,isObject:P,isPlainObject:b,isJSON:V,isFunction:m,isMobile:y,isTelephone:g,isPhone:B,isEmail:M,isIpv4:$}},function(t,n){t.exports=function(t){return void 0===t}},function(t,n){t.exports=function(t){return null===t}},function(t,n){t.exports=function(t){return void 0===t||null===t}},function(t,n,r){var e=r(4),i=r(5);t.exports=function(t){return typeof t===e.BOOLEAN||i(e.BOOLEAN,t)}},function(t,n,r){var e=r(11);t.exports=function(t,n){return e(t,n)&&t-0!=0}},function(t,n,r){var e=r(7),i=r(13);t.exports=function(t,n){return i(t,n)||e(t,n)}},function(t,n,r){var e=r(7),i=r(12);t.exports=function(t,n){return i(t,n)||e(t,n)}},function(t,n,r){var e=r(2),i=r(0),o=r(1);t.exports=function(t,n){return!0===(i(n)?n:{}).isStrict?e(t)&&o.INTEGER_REX.test(t):o.INTEGER_REX.test(t)}},function(t,n,r){var e=r(2),i=r(0),o=r(1);t.exports=function(t,n){return!0===(i(n)?n:{}).isStrict?e(t)&&o.POSITIVE_INTEGER_REX.test(t):o.POSITIVE_INTEGER_REX.test(t)}},function(t,n,r){var e=r(2),i=r(0),o=r(1);t.exports=function(t,n){return!0===(i(n)?n:{}).isStrict?e(t)&&o.NEGATIVE_INTEGER_REX.test(t):o.NEGATIVE_INTEGER_REX.test(t)}},function(t,n,r){var e=r(2),i=r(0),o=r(1);t.exports=function(t,n){return!0===(i(n)?n:{}).isStrict?e(t)&&o.UN_POSITIVE_INTEGER_REX.test(t):o.UN_POSITIVE_INTEGER_REX.test(t)}},function(t,n,r){var e=r(2),i=r(0),o=r(1);t.exports=function(t,n){return!0===(i(n)?n:{}).isStrict?e(t)&&o.UN_NEGATIVE_INTEGER_REX.test(t):o.UN_NEGATIVE_INTEGER_REX.test(t)}},function(t,n,r){var e=r(3),i=r(0);t.exports=function(t,n){var r=i(n)?n:{};return!!e(t)&&(!1===r.isStrict?""===t:""===t.trim())}},function(t,n,r){var e=r(14);t.exports=function(t){return!!e(t)&&0===t.length}},function(t,n,r){var e=r(3),i=r(15);t.exports=function(t){if(!e(t))return!1;try{var n=JSON.parse(t);return i(n)}catch(t){return!1}}},function(t,n,r){var e=r(17),i=r(19);t.exports=function(t,n){return e(t,n)||i(t,n)}},function(t,n,r){var e=r(3),i=r(1);t.exports=function(t){return!!e(t)&&i.EMAIL_REX.test(t)}},function(t,n,r){var e=r(3),i=r(1);t.exports=function(t){return!!e(t)&&i.IPV4_REX.test(t)}}])});