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AzFA","file":"/npm/mini-validator@1.0.1/mini-validator.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/mini-validator@1.0.1/mini-validator.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","(function () {\n  var validator={};\n  //First we need get the Global object('window in brower','global in server-side' )\n  var root= typeof self==='object' && self.self===self&&self ||\n            typeof global ==='object' && global.global===global&& global||\n            this;\n\n   //Define the regex object\n   var numberReg=/^[0-9]+$/,\n       alphaReg=/^[a-z]+$/i,\n       alphaNumbericReg=/^[a-z0-9]+/i,\n       alphaNumbericWithDashReg=/^[a-z0-9_\\-]+/i,\n       emailReg=/^[\\w.!#$%&'*+/=?^`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/i,\n       urlReg=/^((http|https):\\/\\/(\\w+:{0,1}\\w*@)?(\\S+)|)(:[0-9]+)?(\\/|\\/([\\w#!:.?+=&%@!\\-\\/]))?$/;\n\n  //Define the validat functions\n  validator.isNumber=function (string) {\n    return numberReg.test(string);\n  };\n\n  validator.isAlpha=function (string) {\n    return alphaReg.test(string);\n  };\n\n  validator.isAlphaNumber=function (string) {\n    return alphaNumbericReg.test(string);\n  };\n  validator.isAlphaNumberWithDash=function (string) {\n    return alphaNumbericWithDashReg.test(string);\n  };\n\n  validator.isEmail=function (string) {\n    return emailReg.test(string);\n  };\n  validator.isUrl=function (string) {\n    return urlReg.test(string);\n  };\n\n  validator.isSamePassword=function (password,password_confirm) {\n    return password===password_confirm;\n  };\n\n  validator.isMinLength=function (string,min_length) {\n    if(!numberReg.test(min_length)){\n      //input argv error!\n      console.error(\"min length must be a number\");\n      return false;\n    }else{\n      return (string.length>parseInt(min_length,10));\n    }\n  };\n  validator.isExactLength=function (string,length) {\n    if(!numberReg.test(min_length)){\n      //input argv error!\n      console.error(\"length must be a number\");\n      return false;\n    }else{\n      return (string.length===parseInt(length,10));\n    }\n  };\n\n  validator.isMaxLength=function (string,max_length,min_length) {\n    if(!this.isMinLength(string,min_length||0)) {\n      console.log(min_length);\n      return false;\n    }\n    if(!numberReg.test(max_length)){\n      //input argv error!\n      console.error(\"max length must be a number\");\n      return false;\n    }else{\n      return (string.length<parseInt(max_length,10));\n    }\n  };\n\n\n  //if included in server-side(nodejs) with Commonjs\n  if(typeof module==='object' && module.exports){\n    module.exports=validator;\n  }\n  //if included using AMD!\n  else if(typeof define === 'function' && define.amd){\n    define([],function () {\n      return validator;\n    });\n  // for front-end, we just added to global object\n  }else{\n    root.validator=validator;\n  }\n}());\n"]}