-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathlx-valid.min.js
11 lines (9 loc) · 18.1 KB
/
lx-valid.min.js
1
2
3
4
5
6
7
8
9
10
11
/*!
* lx-valid - v1.2.4 - 2016-11-16
* https://github.com/litixsoft/lx-valid
*
* Copyright (c) 2016 Litixsoft GmbH
* Licensed MIT
*/
!function(a){"use strict";function b(a){if(null===a)return"null";if(a&&(1===a.nodeType||9===a.nodeType))return"element";var b=Object.prototype.toString.call(a),c=b.match(/\[object (.*?)\]/)[1].toLowerCase();if("number"===c){if(isNaN(a))return"nan";if(!isFinite(a))return"infinity"}return c}function c(a,b,d){d=f({},c.defaults,d),d.trim===!0&&(String.prototype.trim||(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}));var e=[];return b.items?h(a,a,"",b,d,e):g(a,b,d,e),{valid:!e.length,errors:e}}function d(a,c,e){if("array"===b(a)){var f=a.indexOf(c);if(f>-1)a[a.indexOf(c)]=e;else{var g=0,h=a.length;for(g;g<h;g++)d(a[g],c,e)}}}function e(a){var b=c.types[a];return b||(b=c.types[a.toLowerCase()]),b}function f(a){for(var b=Array.prototype.slice.call(arguments,1);b.length;){var c=b.shift();if(c){if("object"!=typeof c)throw new TypeError("mixin non-object");for(var d in c)c.hasOwnProperty(d)&&(a[d]=c[d])}}return a}function g(a,c,d,e){var f,g,i=Object.keys(a),k=[],l=[];if("array"===b(c.required)?l=c.required:"array"===b(c._required)&&(l=c._required),c.properties){f=c.properties;for(g in f)if(f.hasOwnProperty(g)&&"object"===b(f[g])){var m=f[g];l.indexOf(g)>-1&&(m._required=m.required||[],m.required=!0),k.push(g),h(a,a[g],g,f[g],d,e)}else console.log("Schema invalid. Property "+g+" is not of type object, actual type: "+b(f[g]))}if(c.patternProperties){f=c.patternProperties;for(g in f)if(f.hasOwnProperty(g)&&"object"===b(f[g])){var n=new RegExp(g);for(var o in a)a.hasOwnProperty(o)&&null!==n.exec(o)&&(h(a,a[o],o,f[g],d,e),k.push(o))}else console.log("Schema invalid. Property "+g+" is not of type object, actual type: "+b(f[g]))}if(d.deleteUnknownProperties)for(g in a)a.hasOwnProperty(g)&&k.indexOf(g)===-1&&delete a[g];if(d.unknownProperties)for(g in a)a.hasOwnProperty(g)&&k.indexOf(g)===-1&&("delete"===d.unknownProperties?delete a[g]:"error"===d.unknownProperties&&j("unknown",g,a[g],c,e));if(void 0!==c.additionalProperties){var p,q,r=i.filter(function(a){return-1===k.indexOf(a)});if(c.additionalProperties===!1&&r.length>0)for(p=0,q=r.length;p<q;p++)j("additionalProperties",r[p],a[r[p]],!1,e);else if("object"==typeof c.additionalProperties&&r.length>0)for(p=0,q=r.length;p<q;p++)h(a,a[r[p]],r[p],c.unvisitedProperties,d,e)}}function h(a,e,f,l,m,n){function o(b,c,d){void 0===l[b]||d(c,l[b],a)||j(b,f,c,l,n)}var p,q,r,s,t,u=l.required===!0;if(!m.ignoreNullValues||null!==e||u){if("string"==typeof e&&m.strictRequired===!0&&u){var v=m.trim===!0?e.trim():e;if(""===v)return j("required",f,void 0,l,n)}if(void 0===e){if(void 0===l.default||!m.addMissingDefaults)return u&&"any"!==l.type?j("required",f,void 0,l,n):void o("conform",e,function(a,b,c){return b(a,c)});"function"==typeof l.default?a[f]=e=l.default():a[f]=e=l.default,o("conform",e,function(a,b,c){return b(a,c)})}if(m.cast&&("integer"!==l.type&&"number"!==l.type&&"float"!==l.type||null===e||"boolean"==typeof e||isNaN(+e)||("array"===b(a[f])?d(a[f],e,+e):a[f]=+e,e=+e),"boolean"===l.type&&("true"!==e&&"1"!==e&&1!==e||("array"===b(a[f])?d(a[f],e,!0):a[f]=!0,e=!0),"false"!==e&&"0"!==e&&0!==e||("array"===b(a[f])?d(a[f],e,!1):a[f]=!1,e=!1))),l.format&&m.validateFormats&&"string"==typeof e){var w=k(l.format)?l.format:[l.format];for(q=!1,s=0,t=w.length;s<t;s++)if(p=w[s].toLowerCase().trim(),m.validateFormatExtensions&&(r=c.formatExtensions[p]),r||(r=c.formats[p]),r){if(r.test(e)){if(m.convert&&"function"==typeof m.convert)if(k(a[f])||k(a)){var x=k(a)?a:a[f],y=x.indexOf(e);x[y]=m.convert(p,e)}else a[f]=m.convert(p,e);q=!0;break}q=!1}else if(m.validateFormatsStrict){q=!1;break}if(!q)return j("format",f,e,l,n)}if(l.enum)if(null===e&&k(l.type)&&l.type.indexOf("null")>-1);else if("array"===l.type&&k(e)){for(s=0;s<e.length;s++)if(l.enum.indexOf(e[s])===-1){j("enum",f,e,l,n);break}}else l.enum.indexOf(e)===-1&&j("enum",f,e,l,n);if("string"==typeof l.dependencies&&void 0===a[l.dependencies]&&j("dependencies",f,null,l,n),k(l.dependencies))for(s=0,t=l.dependencies.length;s<t;s++)void 0===a[l.dependencies[s]]&&j("dependencies",f,null,l,n);"object"==typeof l.dependencies&&g(a,l.dependencies,m,n),i(e,l.type,function(c,d){if(c)return j("type",f,b(e),l,n);switch(o("conform",e,function(a,b,c){return b(a,c)}),d||(k(e)?"array":typeof e)){case"string":if(m.trim===!0)if(k(a[f])){var i=a[f].indexOf(e);"string"==typeof a[f][i]&&(a[f][i]=e.trim())}else"string"==typeof a[f]&&(a[f]=e.trim());o("minLength",e.length,function(a,b){return a>=b}),o("maxLength",e.length,function(a,b){return a<=b}),o("pattern",e,function(a,b){return b="string"==typeof b?b=new RegExp(b):b,b.test(a)});break;case"integer":case"number":o("minimum",e,function(a,b){return a>=b}),o("maximum",e,function(a,b){return a<=b}),o("exclusiveMinimum",e,function(a,b){return a>b}),o("exclusiveMaximum",e,function(a,b){return a<b}),o("divisibleBy",e,function(a,b){var c=Math.max((a-Math.floor(a)).toString().length-2,(b-Math.floor(b)).toString().length-2);return c=c>0?Math.pow(10,c):1,a*c%(b*c)===0});break;case"array":o("items",e,function(b,c){for(var d,g=0,i=b.length;g<i;g++)d=[],h(a,b[g],f,c,m,d),d.forEach(function(a){k(e)&&a.property===f?a.property=(f?f+".":"")+g:a.property=(f?f+".":"")+g+(a.property?"."+a.property.replace(f+".",""):"")}),d.unshift(n.length,0),Array.prototype.splice.apply(n,d);return!0}),o("minItems",e,function(a,b){return a.length>=b}),o("maxItems",e,function(a,b){return a.length<=b}),o("uniqueItems",e,function(a,b){if(!b)return!0;for(var c={},d=0,e=a.length;d<e;d++){var f=JSON.stringify(a[d]);if(c[f])return!1;c[f]=!0}return!0});break;case"object":if(l.properties||l.patternProperties||l.additionalProperties){var p=[];g(e,l,m,p),p.forEach(function(a){a.property=f+"."+a.property}),p.unshift(n.length,0),Array.prototype.splice.apply(n,p)}}m.transform&&"function"==typeof m.transform&&m.transform({object:a,value:e,property:f,schema:l,options:m,errors:n})})}}function i(a,b,c){var d=k(b)?b:[b];if(void 0===b)return c(null,b);for(var f=0,g=d.length;f<g;f++){b=d[f].trim();var h=e(b);if(!h)return c(!0);if(h(a))return c(null,b)}c(!0)}function j(a,b,d,e,f){var g={expected:e[a],actual:d,attribute:a,property:b},h=e.messages&&e.messages[a]||e.message||c.messages[a]||"no default message";h=h.replace(/%\{([a-z]+)\}/gi,function(a,b){return g[b.toLowerCase()]||""}),f.push({attribute:a,property:b,expected:e[a],actual:d,message:h})}function k(a){var b=typeof a;return!("object"!==b||!a||"number"!=typeof a.length||a.propertyIsEnumerable("length")||"function"!=typeof a.splice)}c.defaults={validateFormats:!0,validateFormatsStrict:!1,validateFormatExtensions:!0,addMissingDefaults:!1,unknownProperties:"ignore",trim:!1,strictRequired:!1,ignoreNullValues:!1,transform:null},c.messages={required:"is required",minLength:"is too short (minimum is %{expected} characters)",maxLength:"is too long (maximum is %{expected} characters)",pattern:"invalid input",minimum:"must be greater than or equal to %{expected}",maximum:"must be less than or equal to %{expected}",exclusiveMinimum:"must be greater than %{expected}",exclusiveMaximum:"must be less than %{expected}",divisibleBy:"must be divisible by %{expected}",minItems:"must contain more than %{expected} items",maxItems:"must contain less than %{expected} items",uniqueItems:"must hold a unique set of values",format:"is not a valid %{expected}",conform:"must conform to given constraint",type:"must be of %{expected} type",additionalProperties:"must not exist",unknown:"is not defined in schema"},c.messages.enum="must be present in given enumerator",c.formats={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i,"ip-address":/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/i,ipv6:/^([0-9A-Fa-f]{1,4}:){7}[0-9A-Fa-f]{1,4}$/,"date-time":/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:.\d{1,3})?Z$/,date:/^\d{4}-\d{2}-\d{2}$/,time:/^\d{2}:\d{2}:\d{2}$/,color:/^#[a-z0-9]{6}|#[a-z0-9]{3}|(?:rgb\(\s*(?:[+-]?\d+%?)\s*,\s*(?:[+-]?\d+%?)\s*,\s*(?:[+-]?\d+%?)\s*\))aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow$/i,"host-name":/^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])/,"utc-millisec":{test:function(a){return"number"==typeof a&&a>=0}},regex:{test:function(a){try{new RegExp(a)}catch(a){return!1}return!0}},"mongo-id":/^[0-9a-fA-F]{8}[0-9a-fA-F]{6}[0-9a-fA-F]{4}[0-9a-fA-F]{6}$/,uuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,luuid:/^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{12}$/i,"number-float":/^[\-\+]?\b(\d+[.]\d+$)$/,float:/^[\-\+]?\b(\d+[.]\d+$)$/,integer:/^[\-\+]?[0-9]+$/,timestamp:/^[0-9-]+,[\s]*[0-9-]+/,empty:/^$/},c.formatExtensions={url:/^(https?|ftp|git):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i},c.types={string:function(a){return"string"===b(a)},number:function(a){return"number"===b(a)},boolean:function(a){return"boolean"===b(a)},date:function(a){return"date"===b(a)},regexp:function(a){return"regexp"===b(a)},array:function(a){return"array"===b(a)},object:function(a){return"object"===b(a)},integer:function(a){return"number"===b(a)&&Math.floor(a)===a},float:function(a){return"number"===b(a)&&new RegExp(c.formats.float).exec(a)},null:function(a){return"null"===b(a)},undefined:function(a){return"undefined"===b(a)},any:function(a){return void 0!==a},mongoId:function(a){return a&&"object"==typeof a&&"ObjectID"===a._bsontype&&c.formats["mongo-id"].test(a)},dbRef:function(a){return a&&"object"==typeof a&&"DBRef"===a._bsontype&&!!a.namespace&&c.types.string(a.namespace)&&!!a.oid},minKey:function(a){return a&&"object"==typeof a&&"MinKey"===a._bsontype},maxKey:function(a){return a&&"object"==typeof a&&"MaxKey"===a._bsontype},code:function(a){return a&&"object"==typeof a&&"Code"===a._bsontype&&!!a.code&&c.types.string(a.code)&&!!a.scope&&"object"==typeof a.scope},infinity:function(a){return"infinity"===b(a)},nan:function(a){return"nan"===b(a)}},a.validate=c,a.mixin=f}("undefined"==typeof window?module.exports:window.json=window.json||{}),function(a,b,c){"use strict";function d(a,c){if("string"!=typeof a||!(c instanceof RegExp))throw new Error("extensionName or extensionValue undefined or not correct type");if(b.validate.formats.hasOwnProperty(a)||b.validate.formats.hasOwnProperty(a)){var d="extensionName: "+a+" already exists in formatExtensions.";throw new Error(d)}b.validate.formatExtensions[a]=c}function e(a,c){return(b.validate.messages[a]||"").replace("%{expected}",c)}function f(a,b,c){return{attribute:a,expected:b,actual:c,message:e(a,b)}}function g(a){var b={valid:!0,errors:[]};return null!==a&&(b.valid=!1,b.errors.push(a)),b}function h(a){for(var b={},c=0,d=a.length;c<d;c++){var e=JSON.stringify(a[c]);if(b[e])return!1;b[e]=!0}return!0}function i(){var a={};return a.email=function(a){return g(b.validate.formats.email.test(a)?null:f("format","email",a))},a.ipAddress=function(a){return g(b.validate.formats["ip-address"].test(a)?null:f("format","ip-address",a))},a.ipv6=function(a){return g(b.validate.formats.ipv6.test(a)?null:f("format","ipv6",a))},a.dateTime=function(a){return g(b.validate.formats["date-time"].test(a)?null:f("format","date-time",a))},a.date=function(a){return g(b.validate.formats.date.test(a)?null:f("format","date",a))},a.time=function(a){return g(b.validate.formats.time.test(a)?null:f("format","time",a))},a.color=function(a){return g(b.validate.formats.color.test(a)?null:f("format","color",a))},a.hostName=function(a){return g(b.validate.formats["host-name"].test(a)?null:f("format","host-name",a))},a.utcMillisec=function(a){return g(b.validate.formats["utc-millisec"].test(a)?null:f("format","utc-millisec",a))},a.regex=function(a){return g(a instanceof RegExp?null:f("format","regex",a))},a.url=function(a){return g(b.validate.formatExtensions.url.test(a)?null:f("format","url",a))},a.mongoId=function(a){return g(b.validate.formats["mongo-id"].test(a)?null:f("format","mongoId",a))},a.uuid=function(a){return g(b.validate.formats.uuid.test(a)?null:f("format","uuid",a))},a.luuid=function(a){return g(b.validate.formats.luuid.test(a)?null:f("format","luuid",a))},a.numberFloat=function(a){return g("string"==typeof a&&b.validate.formats["number-float"].test(a)?null:f("format","float",a))},a.float=function(a){return g("string"==typeof a&&b.validate.formats.float.test(a)?null:f("format","float",a))},a.integer=function(a){return g("string"==typeof a&&b.validate.formats.integer.test(a)?null:f("format","integer",a))},a.timestamp=function(a){return g(b.validate.formats.timestamp.test(a)?null:f("format","timestamp",a))},a.empty=function(a){return g(b.validate.formats.empty.test(a)?null:f("format","empty",a))},a}function j(){var a,c={},d=Object.keys(b.validate.types),e=d.length;for(a=0;a<e;a++)c[d[a]]=o(d[a]);return c}function k(){var a={};return a.maxLength=function(a,b){return g(!Array.isArray(a)&&"string"!=typeof a||"number"!=typeof b?new Error("rules.maxLength(fail): value must be a string or array, max must be a number"):a.length>b?f("maxLength",b,a):null)},a.minLength=function(a,b){return g(!Array.isArray(a)&&"string"!=typeof a||"number"!=typeof b?new Error("rules.minLength(fail): value must be a string or array, min must be a number"):a.length<b?f("minLength",b,a):null)},a.minimum=function(a,b){return g("number"!=typeof a||"number"!=typeof b?new Error("rules.minimum(fail): value must be a number, min must be a number"):a<b?f("minimum",b,a):null)},a.maximum=function(a,b){return g("number"!=typeof a||"number"!=typeof b?new Error("rules.maximum(fail): value must be a number, max must be a number"):a>b?f("maximum",b,a):null)},a.exclusiveMinimum=function(a,b){return g("number"!=typeof a||"number"!=typeof b?new Error("rules.exclusiveMinimum(fail): value must be a number, min must be a number"):a<=b?f("exclusiveMinimum",b,a):null)},a.exclusiveMaximum=function(a,b){return g("number"!=typeof a||"number"!=typeof b?new Error("rules.exclusiveMaximum(fail): value must be a number, max must be a number"):a>=b?f("exclusiveMinimum",b,a):null)},a.divisibleBy=function(a,b){if("number"!=typeof a||"number"!=typeof b)return g(new Error("rules.divisibleBy(fail): value must be a number, div must be a number"));var c=Math.max((a-Math.floor(a)).toString().length-2,(b-Math.floor(b)).toString().length-2);return c=c>0?Math.pow(10,c):1,g(a*c%(b*c)!==0?f("divisibleBy",b,a):null)},a.minItems=function(a,b){return g(Array.isArray(a)&&"number"==typeof b?a.length<b?f("minItems",b,a.length):null:new Error("rules.minItems(fail): value must be a array, min must be a number"))},a.maxItems=function(a,b){return g(Array.isArray(a)&&"number"==typeof b?a.length>b?f("maxItems",b,a.length):null:new Error("rules.maxItems(fail): value must be a array, max must be a number"))},a.uniqueItems=function(a){return g(Array.isArray(a)?h(a)?null:f("uniqueItems",a,!0):new Error("rules.uniqueItems(fail): value must be a array"))},a.enum=function(a,b){return g("undefined"!=typeof a&&Array.isArray(b)?b.indexOf(a)===-1?f("enum",b,a):null:new Error("rules.enum(fail): value must be a defined and enum mus be a array"))},a}function l(){var a={},b=[];return a.register=function(a,c){b.push(function(b){a(c,b)})},a.exec=function(a,d){c.parallel(b,function(c,e){if(b=[],c)d(c);else{var f,g;for(f=0,g=e.length;f<g;f+=1)e[f].valid||(a.valid=!1,a.errors.push(e[f].errors[0]));d(null,a)}})},a}function m(b){return b=b||{},function(c,d,e){if(c=c||{},e=e||{},e.isUpdate=e.isUpdate||!1,e.isUpdate){var f,g=Object.keys(d.properties),h=g.length;for(f=0;f<h;f++)c.hasOwnProperty(g[f])||(d.properties[g[f]].required=!1,Array.isArray(d.required)&&d.required.indexOf(g[f])>-1&&d.required.splice(d.required.indexOf(g[f]),1))}for(var i in b)b.hasOwnProperty(i)&&!e.hasOwnProperty(i)&&(e[i]=b[i]);return a.validate(c,d,e)}}function n(a,b){return function(c){return b[a](c).valid}}function o(a){return function(c){return g(b.validate.types[a](c)?null:f("type",a,c))}}function p(a){return"is"+a[0].toUpperCase()+a.substr(1)}a.validate=b.validate,a.mixin=b.mixin,a.extendFormat=d,a.formats=i(),a.types=j(),a.rules=k(),a.asyncValidate=l(),a.getValidationFunction=m;var q,r=Object.keys(a.types),s=r.length;for(q=0;q<s;q++)a[p(r[q])]=n(r[q],a.types)}("undefined"==typeof window?module.exports:window.lxvalid=window.lxvalid||{},"undefined"==typeof window?require("./revalidator"):window.json,"undefined"==typeof window?require("async"):window.async);
//# sourceMappingURL=lx-valid.min.js.map