{"version":3,"sources":["webpack:///./node_modules/async-validator/es/util.js","webpack:///./node_modules/async-validator/es/rule/required.js","webpack:///./node_modules/async-validator/es/rule/index.js","webpack:///./node_modules/async-validator/es/index.js","webpack:///./node_modules/async-validator/es/validator/index.js","webpack:///./node_modules/async-validator/es/validator/string.js","webpack:///./node_modules/async-validator/es/rule/whitespace.js","webpack:///./node_modules/async-validator/es/rule/type.js","webpack:///./node_modules/async-validator/es/rule/range.js","webpack:///./node_modules/async-validator/es/rule/enum.js","webpack:///./node_modules/async-validator/es/rule/pattern.js","webpack:///./node_modules/async-validator/es/validator/method.js","webpack:///./node_modules/async-validator/es/validator/number.js","webpack:///./node_modules/async-validator/es/validator/boolean.js","webpack:///./node_modules/async-validator/es/validator/regexp.js","webpack:///./node_modules/async-validator/es/validator/integer.js","webpack:///./node_modules/async-validator/es/validator/float.js","webpack:///./node_modules/async-validator/es/validator/array.js","webpack:///./node_modules/async-validator/es/validator/object.js","webpack:///./node_modules/async-validator/es/validator/enum.js","webpack:///./node_modules/async-validator/es/validator/pattern.js","webpack:///./node_modules/async-validator/es/validator/date.js","webpack:///./node_modules/async-validator/es/validator/required.js","webpack:///./node_modules/async-validator/es/validator/type.js","webpack:///./node_modules/async-validator/es/messages.js"],"names":["Object","defineProperty","exports","value","_extends","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","_typeof","Symbol","iterator","obj","constructor","convertFieldsError","format","_len","args","Array","_key","f","len","apply","slice","str","String","replace","formatRegExp","x","Number","JSON","stringify","_","arg","isEmptyValue","type","isArray","isNativeStringType","isEmptyObject","keys","asyncMap","objArr","option","func","callback","first","asyncSerialArray","ret","forEach","k","push","flattenObjArr","firstFields","objArrKeys","objArrLength","total","results","pending","Promise","resolve","reject","next","errors","fields","arr","indexOf","arrLength","count","a","asyncParallelArray","e","complementError","rule","oe","message","field","fullField","deepMerge","s","warning","error","index","original","util","__esModule","newObj","_interopRequireWildcard","options","required","messages","_required2","_interopRequireDefault","_whitespace2","_type2","_range2","_enum2","_pattern2","whitespace","range","pattern","_util","_validator","_validator2","_messages2","Schema","descriptor","this","rules","_messages","define","newMessages","Error","z","item","validate","source_","_this","o","undefined","oc","complete","_errors","concat","series","r","transform","validator","getValidationMethod","getType","errorFields","data","doIt","deep","defaultField","addFullfield","schema","cb","suppressWarning","map","fieldsSchema","fieldSchema","bind","errs","finalErrors","res","asyncValidator","then","RegExp","messageIndex","splice","register","_string2","_method2","_number2","_boolean2","_regexp2","_integer2","_float2","_array2","_object2","_date2","string","method","number","boolean","regexp","integer","float","array","object","date","url","hex","email","_rule","_rule2","test","_required","types","parseInt","getTime","getMonth","getYear","isNaN","match","ruleType","min","max","val","num","join","lastIndex","mismatch","dateObject","Date","parse","invalid","clone","cloned"],"mappings":"yFAEAA,OAAOC,eAAeC,EAAS,aAAc,CAC3CC,OAAO,IAGT,IAAIC,EAAWJ,OAAOK,QAAU,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAASF,UAAUD,GAAI,IAAK,IAAII,KAAOD,EAAcV,OAAOY,UAAUC,eAAeC,KAAKJ,EAAQC,KAAQL,EAAOK,GAAOD,EAAOC,IAAY,OAAOL,GAEnPS,EAA4B,mBAAXC,QAAoD,iBAApBA,OAAOC,SAAwB,SAAUC,GAAO,cAAcA,GAAS,SAAUA,GAAO,OAAOA,GAAyB,mBAAXF,QAAyBE,EAAIC,cAAgBH,QAAUE,IAAQF,OAAOJ,UAAY,gBAAkBM,GAEtQhB,EAAQkB,mBAAqBA,EAC7BlB,EAAQmB,OAoCR,WACE,IAAK,IAAIC,EAAOd,UAAUC,OAAQc,EAAOC,MAAMF,GAAOG,EAAO,EAAGA,EAAOH,EAAMG,IAC3EF,EAAKE,GAAQjB,UAAUiB,GAGzB,IAAIlB,EAAI,EACJmB,EAAIH,EAAK,GACTI,EAAMJ,EAAKd,OACf,GAAiB,mBAANiB,EACT,OAAOA,EAAEE,MAAM,KAAML,EAAK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iCCrBX,SAASgD,IACP,MAAO,CACL,QAAW,+BACXtB,SAAU,iBACV,KAAQ,uBACRS,WAAY,qBACZyE,KAAM,CACJ3J,OAAQ,sCACRoL,MAAO,8CACPC,QAAS,yBAEXlB,MAAO,CACLjB,OAAQ,iBACRC,OAAQ,4BACRM,MAAO,kBACPC,OAAQ,kBACRN,OAAQ,iBACRO,KAAM,iBACNN,QAAS,iBACTE,QAAS,kBACTC,MAAO,iBACPF,OAAQ,uBACRQ,MAAO,uBACPF,IAAK,uBACLC,IAAK,wBAEPX,OAAQ,CACN5I,IAAK,mCACLqK,IAAK,oCACLC,IAAK,yCACLzF,MAAO,2CAETiE,OAAQ,CACN9I,IAAK,mBACLqK,IAAK,4BACLC,IAAK,+BACLzF,MAAO,gCAETsE,MAAO,CACLnJ,IAAK,kCACLqK,IAAK,sCACLC,IAAK,yCACLzF,MAAO,0CAETC,QAAS,CACP6F,SAAU,yCAEZK,MAAO,WACL,IAAIC,EAASxK,KAAKqK,MAAMrK,KAAKC,UAAU2E,OAEvC,OADA4F,EAAOD,MAAQ3F,KAAK2F,MACbC,IAtDb5M,OAAOC,eAAeC,EAAS,aAAc,CAC3CC,OAAO,IAETD,EAAQkH,YAAcA,EAwDPlH,EAAQ6F,SAAWqB","file":"npm.async-validator.c920b4ddeb9b68365139.js","sourcesContent":["'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nexports.convertFieldsError = convertFieldsError;\nexports.format = format;\nexports.isEmptyValue = isEmptyValue;\nexports.isEmptyObject = isEmptyObject;\nexports.asyncMap = asyncMap;\nexports.complementError = complementError;\nexports.deepMerge = deepMerge;\n/* eslint no-console:0 */\n\nvar formatRegExp = /%[sdj%]/g;\n\nvar warning = exports.warning = function warning() {};\n\n// don't print warning message when in production env or node runtime\nif (process.env.NODE_ENV !== 'production' && typeof window !== 'undefined' && typeof document !== 'undefined') {\n exports.warning = warning = function warning(type, errors) {\n if (typeof console !== 'undefined' && console.warn) {\n if (errors.every(function (e) {\n return typeof e === 'string';\n })) {\n console.warn(type, errors);\n }\n }\n };\n}\n\nfunction convertFieldsError(errors) {\n if (!errors || !errors.length) return null;\n var fields = {};\n errors.forEach(function (error) {\n var field = error.field;\n fields[field] = fields[field] || [];\n fields[field].push(error);\n });\n return fields;\n}\n\nfunction format() {\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var i = 1;\n var f = args[0];\n var len = args.length;\n if (typeof f === 'function') {\n return f.apply(null, args.slice(1));\n }\n if (typeof f === 'string') {\n var str = String(f).replace(formatRegExp, function (x) {\n if (x === '%%') {\n return '%';\n }\n if (i >= len) {\n return x;\n }\n switch (x) {\n case '%s':\n return String(args[i++]);\n case '%d':\n return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n break;\n default:\n return x;\n }\n });\n for (var arg = args[i]; i < len; arg = args[++i]) {\n str += ' ' + arg;\n }\n return str;\n }\n return f;\n}\n\nfunction isNativeStringType(type) {\n return type === 'string' || type === 'url' || type === 'hex' || type === 'email' || type === 'pattern';\n}\n\nfunction isEmptyValue(value, type) {\n if (value === undefined || value === null) {\n return true;\n }\n if (type === 'array' && Array.isArray(value) && !value.length) {\n return true;\n }\n if (isNativeStringType(type) && typeof value === 'string' && !value) {\n return true;\n }\n return false;\n}\n\nfunction isEmptyObject(obj) {\n return Object.keys(obj).length === 0;\n}\n\nfunction asyncParallelArray(arr, func, callback) {\n var results = [];\n var total = 0;\n var arrLength = arr.length;\n\n function count(errors) {\n results.push.apply(results, errors);\n total++;\n if (total === arrLength) {\n callback(results);\n }\n }\n\n arr.forEach(function (a) {\n func(a, count);\n });\n}\n\nfunction asyncSerialArray(arr, func, callback) {\n var index = 0;\n var arrLength = arr.length;\n\n function next(errors) {\n if (errors && errors.length) {\n callback(errors);\n return;\n }\n var original = index;\n index = index + 1;\n if (original < arrLength) {\n func(arr[original], next);\n } else {\n callback([]);\n }\n }\n\n next([]);\n}\n\nfunction flattenObjArr(objArr) {\n var ret = [];\n Object.keys(objArr).forEach(function (k) {\n ret.push.apply(ret, objArr[k]);\n });\n return ret;\n}\n\nfunction asyncMap(objArr, option, func, callback) {\n if (option.first) {\n var flattenArr = flattenObjArr(objArr);\n return asyncSerialArray(flattenArr, func, callback);\n }\n var firstFields = option.firstFields || [];\n if (firstFields === true) {\n firstFields = Object.keys(objArr);\n }\n var objArrKeys = Object.keys(objArr);\n var objArrLength = objArrKeys.length;\n var total = 0;\n var results = [];\n var pending = new Promise(function (resolve, reject) {\n var next = function next(errors) {\n results.push.apply(results, errors);\n total++;\n if (total === objArrLength) {\n callback(results);\n return results.length ? reject({ errors: results, fields: convertFieldsError(results) }) : resolve();\n }\n };\n objArrKeys.forEach(function (key) {\n var arr = objArr[key];\n if (firstFields.indexOf(key) !== -1) {\n asyncSerialArray(arr, func, next);\n } else {\n asyncParallelArray(arr, func, next);\n }\n });\n });\n pending['catch'](function (e) {\n return e;\n });\n return pending;\n}\n\nfunction complementError(rule) {\n return function (oe) {\n if (oe && oe.message) {\n oe.field = oe.field || rule.fullField;\n return oe;\n }\n return {\n message: typeof oe === 'function' ? oe() : oe,\n field: oe.field || rule.fullField\n };\n };\n}\n\nfunction deepMerge(target, source) {\n if (source) {\n for (var s in source) {\n if (source.hasOwnProperty(s)) {\n var value = source[s];\n if ((typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && _typeof(target[s]) === 'object') {\n target[s] = _extends({}, target[s], value);\n } else {\n target[s] = value;\n }\n }\n }\n }\n return target;\n}","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _util = require('../util');\n\nvar util = _interopRequireWildcard(_util);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\n/**\n * Rule for validating required fields.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction required(rule, value, source, errors, options, type) {\n if (rule.required && (!source.hasOwnProperty(rule.field) || util.isEmptyValue(value, type || rule.type))) {\n errors.push(util.format(options.messages.required, rule.fullField));\n }\n}\n\nexports['default'] = required;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _required = require('./required');\n\nvar _required2 = _interopRequireDefault(_required);\n\nvar _whitespace = require('./whitespace');\n\nvar _whitespace2 = _interopRequireDefault(_whitespace);\n\nvar _type = require('./type');\n\nvar _type2 = _interopRequireDefault(_type);\n\nvar _range = require('./range');\n\nvar _range2 = _interopRequireDefault(_range);\n\nvar _enum = require('./enum');\n\nvar _enum2 = _interopRequireDefault(_enum);\n\nvar _pattern = require('./pattern');\n\nvar _pattern2 = _interopRequireDefault(_pattern);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = {\n required: _required2['default'],\n whitespace: _whitespace2['default'],\n type: _type2['default'],\n range: _range2['default'],\n 'enum': _enum2['default'],\n pattern: _pattern2['default']\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _util = require('./util');\n\nvar _validator = require('./validator/');\n\nvar _validator2 = _interopRequireDefault(_validator);\n\nvar _messages2 = require('./messages');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * Encapsulates a validation schema.\n *\n * @param descriptor An object declaring validation rules\n * for this schema.\n */\nfunction Schema(descriptor) {\n this.rules = null;\n this._messages = _messages2.messages;\n this.define(descriptor);\n}\n\nSchema.prototype = {\n messages: function messages(_messages) {\n if (_messages) {\n this._messages = (0, _util.deepMerge)((0, _messages2.newMessages)(), _messages);\n }\n return this._messages;\n },\n define: function define(rules) {\n if (!rules) {\n throw new Error('Cannot configure a schema with no rules');\n }\n if ((typeof rules === 'undefined' ? 'undefined' : _typeof(rules)) !== 'object' || Array.isArray(rules)) {\n throw new Error('Rules must be an object');\n }\n this.rules = {};\n var z = void 0;\n var item = void 0;\n for (z in rules) {\n if (rules.hasOwnProperty(z)) {\n item = rules[z];\n this.rules[z] = Array.isArray(item) ? item : [item];\n }\n }\n },\n validate: function validate(source_) {\n var _this = this;\n\n var o = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var oc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : function () {};\n\n var source = source_;\n var options = o;\n var callback = oc;\n if (typeof options === 'function') {\n callback = options;\n options = {};\n }\n if (!this.rules || Object.keys(this.rules).length === 0) {\n if (callback) {\n callback();\n }\n return Promise.resolve();\n }\n\n function complete(results) {\n var i = void 0;\n var errors = [];\n var fields = {};\n\n function add(e) {\n if (Array.isArray(e)) {\n var _errors;\n\n errors = (_errors = errors).concat.apply(_errors, e);\n } else {\n errors.push(e);\n }\n }\n\n for (i = 0; i < results.length; i++) {\n add(results[i]);\n }\n if (!errors.length) {\n errors = null;\n fields = null;\n } else {\n fields = (0, _util.convertFieldsError)(errors);\n }\n callback(errors, fields);\n }\n\n if (options.messages) {\n var messages = this.messages();\n if (messages === _messages2.messages) {\n messages = (0, _messages2.newMessages)();\n }\n (0, _util.deepMerge)(messages, options.messages);\n options.messages = messages;\n } else {\n options.messages = this.messages();\n }\n var arr = void 0;\n var value = void 0;\n var series = {};\n var keys = options.keys || Object.keys(this.rules);\n keys.forEach(function (z) {\n arr = _this.rules[z];\n value = source[z];\n arr.forEach(function (r) {\n var rule = r;\n if (typeof rule.transform === 'function') {\n if (source === source_) {\n source = _extends({}, source);\n }\n value = source[z] = rule.transform(value);\n }\n if (typeof rule === 'function') {\n rule = {\n validator: rule\n };\n } else {\n rule = _extends({}, rule);\n }\n rule.validator = _this.getValidationMethod(rule);\n rule.field = z;\n rule.fullField = rule.fullField || z;\n rule.type = _this.getType(rule);\n if (!rule.validator) {\n return;\n }\n series[z] = series[z] || [];\n series[z].push({\n rule: rule,\n value: value,\n source: source,\n field: z\n });\n });\n });\n var errorFields = {};\n return (0, _util.asyncMap)(series, options, function (data, doIt) {\n var rule = data.rule;\n var deep = (rule.type === 'object' || rule.type === 'array') && (_typeof(rule.fields) === 'object' || _typeof(rule.defaultField) === 'object');\n deep = deep && (rule.required || !rule.required && data.value);\n rule.field = data.field;\n\n function addFullfield(key, schema) {\n return _extends({}, schema, {\n fullField: rule.fullField + '.' + key\n });\n }\n\n function cb() {\n var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];\n\n var errors = e;\n if (!Array.isArray(errors)) {\n errors = [errors];\n }\n if (!options.suppressWarning && errors.length) {\n Schema.warning('async-validator:', errors);\n }\n if (errors.length && rule.message) {\n errors = [].concat(rule.message);\n }\n\n errors = errors.map((0, _util.complementError)(rule));\n\n if (options.first && errors.length) {\n errorFields[rule.field] = 1;\n return doIt(errors);\n }\n if (!deep) {\n doIt(errors);\n } else {\n // if rule is required but the target object\n // does not exist fail at the rule level and don't\n // go deeper\n if (rule.required && !data.value) {\n if (rule.message) {\n errors = [].concat(rule.message).map((0, _util.complementError)(rule));\n } else if (options.error) {\n errors = [options.error(rule, (0, _util.format)(options.messages.required, rule.field))];\n } else {\n errors = [];\n }\n return doIt(errors);\n }\n\n var fieldsSchema = {};\n if (rule.defaultField) {\n for (var k in data.value) {\n if (data.value.hasOwnProperty(k)) {\n fieldsSchema[k] = rule.defaultField;\n }\n }\n }\n fieldsSchema = _extends({}, fieldsSchema, data.rule.fields);\n for (var f in fieldsSchema) {\n if (fieldsSchema.hasOwnProperty(f)) {\n var fieldSchema = Array.isArray(fieldsSchema[f]) ? fieldsSchema[f] : [fieldsSchema[f]];\n fieldsSchema[f] = fieldSchema.map(addFullfield.bind(null, f));\n }\n }\n var schema = new Schema(fieldsSchema);\n schema.messages(options.messages);\n if (data.rule.options) {\n data.rule.options.messages = options.messages;\n data.rule.options.error = options.error;\n }\n schema.validate(data.value, data.rule.options || options, function (errs) {\n var finalErrors = [];\n if (errors && errors.length) {\n finalErrors.push.apply(finalErrors, errors);\n }\n if (errs && errs.length) {\n finalErrors.push.apply(finalErrors, errs);\n }\n doIt(finalErrors.length ? finalErrors : null);\n });\n }\n }\n\n var res = void 0;\n if (rule.asyncValidator) {\n res = rule.asyncValidator(rule, data.value, cb, data.source, options);\n } else if (rule.validator) {\n res = rule.validator(rule, data.value, cb, data.source, options);\n if (res === true) {\n cb();\n } else if (res === false) {\n cb(rule.message || rule.field + ' fails');\n } else if (res instanceof Array) {\n cb(res);\n } else if (res instanceof Error) {\n cb(res.message);\n }\n }\n if (res && res.then) {\n res.then(function () {\n return cb();\n }, function (e) {\n return cb(e);\n });\n }\n }, function (results) {\n complete(results);\n });\n },\n getType: function getType(rule) {\n if (rule.type === undefined && rule.pattern instanceof RegExp) {\n rule.type = 'pattern';\n }\n if (typeof rule.validator !== 'function' && rule.type && !_validator2['default'].hasOwnProperty(rule.type)) {\n throw new Error((0, _util.format)('Unknown rule type %s', rule.type));\n }\n return rule.type || 'string';\n },\n getValidationMethod: function getValidationMethod(rule) {\n if (typeof rule.validator === 'function') {\n return rule.validator;\n }\n var keys = Object.keys(rule);\n var messageIndex = keys.indexOf('message');\n if (messageIndex !== -1) {\n keys.splice(messageIndex, 1);\n }\n if (keys.length === 1 && keys[0] === 'required') {\n return _validator2['default'].required;\n }\n return _validator2['default'][this.getType(rule)] || false;\n }\n};\n\nSchema.register = function register(type, validator) {\n if (typeof validator !== 'function') {\n throw new Error('Cannot register a validator by type, validator is not a function');\n }\n _validator2['default'][type] = validator;\n};\n\nSchema.warning = _util.warning;\n\nSchema.messages = _messages2.messages;\n\nexports['default'] = Schema;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _string = require('./string');\n\nvar _string2 = _interopRequireDefault(_string);\n\nvar _method = require('./method');\n\nvar _method2 = _interopRequireDefault(_method);\n\nvar _number = require('./number');\n\nvar _number2 = _interopRequireDefault(_number);\n\nvar _boolean = require('./boolean');\n\nvar _boolean2 = _interopRequireDefault(_boolean);\n\nvar _regexp = require('./regexp');\n\nvar _regexp2 = _interopRequireDefault(_regexp);\n\nvar _integer = require('./integer');\n\nvar _integer2 = _interopRequireDefault(_integer);\n\nvar _float = require('./float');\n\nvar _float2 = _interopRequireDefault(_float);\n\nvar _array = require('./array');\n\nvar _array2 = _interopRequireDefault(_array);\n\nvar _object = require('./object');\n\nvar _object2 = _interopRequireDefault(_object);\n\nvar _enum = require('./enum');\n\nvar _enum2 = _interopRequireDefault(_enum);\n\nvar _pattern = require('./pattern');\n\nvar _pattern2 = _interopRequireDefault(_pattern);\n\nvar _date = require('./date');\n\nvar _date2 = _interopRequireDefault(_date);\n\nvar _required = require('./required');\n\nvar _required2 = _interopRequireDefault(_required);\n\nvar _type = require('./type');\n\nvar _type2 = _interopRequireDefault(_type);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nexports['default'] = {\n string: _string2['default'],\n method: _method2['default'],\n number: _number2['default'],\n boolean: _boolean2['default'],\n regexp: _regexp2['default'],\n integer: _integer2['default'],\n float: _float2['default'],\n array: _array2['default'],\n object: _object2['default'],\n 'enum': _enum2['default'],\n pattern: _pattern2['default'],\n date: _date2['default'],\n url: _type2['default'],\n hex: _type2['default'],\n email: _type2['default'],\n required: _required2['default']\n};","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nvar _util = require('../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * Performs validation for string types.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction string(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if ((0, _util.isEmptyValue)(value, 'string') && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options, 'string');\n if (!(0, _util.isEmptyValue)(value, 'string')) {\n _rule2['default'].type(rule, value, source, errors, options);\n _rule2['default'].range(rule, value, source, errors, options);\n _rule2['default'].pattern(rule, value, source, errors, options);\n if (rule.whitespace === true) {\n _rule2['default'].whitespace(rule, value, source, errors, options);\n }\n }\n }\n callback(errors);\n}\n\nexports['default'] = string;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _util = require('../util');\n\nvar util = _interopRequireWildcard(_util);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\n/**\n * Rule for validating whitespace.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction whitespace(rule, value, source, errors, options) {\n if (/^\\s+$/.test(value) || value === '') {\n errors.push(util.format(options.messages.whitespace, rule.fullField));\n }\n}\n\nexports['default'] = whitespace;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _util = require('../util');\n\nvar util = _interopRequireWildcard(_util);\n\nvar _required = require('./required');\n\nvar _required2 = _interopRequireDefault(_required);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\n/* eslint max-len:0 */\n\nvar pattern = {\n // http://emailregex.com/\n email: /^(([^<>()\\[\\]\\\\.,;:\\s@\"]+(\\.[^<>()\\[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/,\n url: new RegExp('^(?!mailto:)(?:(?:http|https|ftp)://|//)(?:\\\\S+(?::\\\\S*)?@)?(?:(?:(?:[1-9]\\\\d?|1\\\\d\\\\d|2[01]\\\\d|22[0-3])(?:\\\\.(?:1?\\\\d{1,2}|2[0-4]\\\\d|25[0-5])){2}(?:\\\\.(?:[0-9]\\\\d?|1\\\\d\\\\d|2[0-4]\\\\d|25[0-4]))|(?:(?:[a-z\\\\u00a1-\\\\uffff0-9]+-?)*[a-z\\\\u00a1-\\\\uffff0-9]+)(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff0-9]+-?)*[a-z\\\\u00a1-\\\\uffff0-9]+)*(?:\\\\.(?:[a-z\\\\u00a1-\\\\uffff]{2,})))|localhost)(?::\\\\d{2,5})?(?:(/|\\\\?|#)[^\\\\s]*)?$', 'i'),\n hex: /^#?([a-f0-9]{6}|[a-f0-9]{3})$/i\n};\n\nvar types = {\n integer: function integer(value) {\n return types.number(value) && parseInt(value, 10) === value;\n },\n float: function float(value) {\n return types.number(value) && !types.integer(value);\n },\n array: function array(value) {\n return Array.isArray(value);\n },\n regexp: function regexp(value) {\n if (value instanceof RegExp) {\n return true;\n }\n try {\n return !!new RegExp(value);\n } catch (e) {\n return false;\n }\n },\n date: function date(value) {\n return typeof value.getTime === 'function' && typeof value.getMonth === 'function' && typeof value.getYear === 'function';\n },\n number: function number(value) {\n if (isNaN(value)) {\n return false;\n }\n return typeof value === 'number';\n },\n object: function object(value) {\n return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' && !types.array(value);\n },\n method: function method(value) {\n return typeof value === 'function';\n },\n email: function email(value) {\n return typeof value === 'string' && !!value.match(pattern.email) && value.length < 255;\n },\n url: function url(value) {\n return typeof value === 'string' && !!value.match(pattern.url);\n },\n hex: function hex(value) {\n return typeof value === 'string' && !!value.match(pattern.hex);\n }\n};\n\n/**\n * Rule for validating the type of a value.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction type(rule, value, source, errors, options) {\n if (rule.required && value === undefined) {\n (0, _required2['default'])(rule, value, source, errors, options);\n return;\n }\n var custom = ['integer', 'float', 'array', 'regexp', 'object', 'method', 'email', 'number', 'date', 'url', 'hex'];\n var ruleType = rule.type;\n if (custom.indexOf(ruleType) > -1) {\n if (!types[ruleType](value)) {\n errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type));\n }\n // straight typeof check\n } else if (ruleType && (typeof value === 'undefined' ? 'undefined' : _typeof(value)) !== rule.type) {\n errors.push(util.format(options.messages.types[ruleType], rule.fullField, rule.type));\n }\n}\n\nexports['default'] = type;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _util = require('../util');\n\nvar util = _interopRequireWildcard(_util);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\n/**\n * Rule for validating minimum and maximum allowed values.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction range(rule, value, source, errors, options) {\n var len = typeof rule.len === 'number';\n var min = typeof rule.min === 'number';\n var max = typeof rule.max === 'number';\n // 正则匹配码点范围从U+010000一直到U+10FFFF的文字(补充平面Supplementary Plane)\n var spRegexp = /[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]/g;\n var val = value;\n var key = null;\n var num = typeof value === 'number';\n var str = typeof value === 'string';\n var arr = Array.isArray(value);\n if (num) {\n key = 'number';\n } else if (str) {\n key = 'string';\n } else if (arr) {\n key = 'array';\n }\n // if the value is not of a supported type for range validation\n // the validation rule rule should use the\n // type property to also test for a particular type\n if (!key) {\n return false;\n }\n if (arr) {\n val = value.length;\n }\n if (str) {\n // 处理码点大于U+010000的文字length属性不准确的bug,如\"𠮷𠮷𠮷\".lenght !== 3\n val = value.replace(spRegexp, '_').length;\n }\n if (len) {\n if (val !== rule.len) {\n errors.push(util.format(options.messages[key].len, rule.fullField, rule.len));\n }\n } else if (min && !max && val < rule.min) {\n errors.push(util.format(options.messages[key].min, rule.fullField, rule.min));\n } else if (max && !min && val > rule.max) {\n errors.push(util.format(options.messages[key].max, rule.fullField, rule.max));\n } else if (min && max && (val < rule.min || val > rule.max)) {\n errors.push(util.format(options.messages[key].range, rule.fullField, rule.min, rule.max));\n }\n}\n\nexports['default'] = range;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _util = require('../util');\n\nvar util = _interopRequireWildcard(_util);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\nvar ENUM = 'enum';\n\n/**\n * Rule for validating a value exists in an enumerable list.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction enumerable(rule, value, source, errors, options) {\n rule[ENUM] = Array.isArray(rule[ENUM]) ? rule[ENUM] : [];\n if (rule[ENUM].indexOf(value) === -1) {\n errors.push(util.format(options.messages[ENUM], rule.fullField, rule[ENUM].join(', ')));\n }\n}\n\nexports['default'] = enumerable;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _util = require('../util');\n\nvar util = _interopRequireWildcard(_util);\n\nfunction _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj['default'] = obj; return newObj; } }\n\n/**\n * Rule for validating a regular expression pattern.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param source The source object being validated.\n * @param errors An array of errors that this rule may add\n * validation errors to.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction pattern(rule, value, source, errors, options) {\n if (rule.pattern) {\n if (rule.pattern instanceof RegExp) {\n // if a RegExp instance is passed, reset `lastIndex` in case its `global`\n // flag is accidentally set to `true`, which in a validation scenario\n // is not necessary and the result might be misleading\n rule.pattern.lastIndex = 0;\n if (!rule.pattern.test(value)) {\n errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));\n }\n } else if (typeof rule.pattern === 'string') {\n var _pattern = new RegExp(rule.pattern);\n if (!_pattern.test(value)) {\n errors.push(util.format(options.messages.pattern.mismatch, rule.fullField, value, rule.pattern));\n }\n }\n }\n}\n\nexports['default'] = pattern;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nvar _util = require('../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * Validates a function.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction method(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if ((0, _util.isEmptyValue)(value) && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options);\n if (value !== undefined) {\n _rule2['default'].type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexports['default'] = method;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nvar _util = require('../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * Validates a number.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction number(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if (value === '') {\n value = undefined;\n }\n if ((0, _util.isEmptyValue)(value) && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options);\n if (value !== undefined) {\n _rule2['default'].type(rule, value, source, errors, options);\n _rule2['default'].range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexports['default'] = number;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _util = require('../util');\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * Validates a boolean.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction boolean(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if ((0, _util.isEmptyValue)(value) && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options);\n if (value !== undefined) {\n _rule2['default'].type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexports['default'] = boolean;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nvar _util = require('../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * Validates the regular expression type.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction regexp(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if ((0, _util.isEmptyValue)(value) && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options);\n if (!(0, _util.isEmptyValue)(value)) {\n _rule2['default'].type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexports['default'] = regexp;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nvar _util = require('../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * Validates a number is an integer.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction integer(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if ((0, _util.isEmptyValue)(value) && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options);\n if (value !== undefined) {\n _rule2['default'].type(rule, value, source, errors, options);\n _rule2['default'].range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexports['default'] = integer;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nvar _util = require('../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * Validates a number is a floating point number.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction floatFn(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if ((0, _util.isEmptyValue)(value) && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options);\n if (value !== undefined) {\n _rule2['default'].type(rule, value, source, errors, options);\n _rule2['default'].range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexports['default'] = floatFn;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nvar _util = require('../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * Validates an array.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction array(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if ((0, _util.isEmptyValue)(value, 'array') && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options, 'array');\n if (!(0, _util.isEmptyValue)(value, 'array')) {\n _rule2['default'].type(rule, value, source, errors, options);\n _rule2['default'].range(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexports['default'] = array;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nvar _util = require('../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * Validates an object.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction object(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if ((0, _util.isEmptyValue)(value) && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options);\n if (value !== undefined) {\n _rule2['default'].type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexports['default'] = object;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nvar _util = require('../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nvar ENUM = 'enum';\n\n/**\n * Validates an enumerable list.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction enumerable(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if ((0, _util.isEmptyValue)(value) && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options);\n if (value) {\n _rule2['default'][ENUM](rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexports['default'] = enumerable;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nvar _util = require('../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\n/**\n * Validates a regular expression pattern.\n *\n * Performs validation when a rule only contains\n * a pattern property but is not declared as a string type.\n *\n * @param rule The validation rule.\n * @param value The value of the field on the source object.\n * @param callback The callback function.\n * @param source The source object being validated.\n * @param options The validation options.\n * @param options.messages The validation messages.\n */\nfunction pattern(rule, value, callback, source, options) {\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if ((0, _util.isEmptyValue)(value, 'string') && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options);\n if (!(0, _util.isEmptyValue)(value, 'string')) {\n _rule2['default'].pattern(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexports['default'] = pattern;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nvar _util = require('../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction date(rule, value, callback, source, options) {\n // console.log('integer rule called %j', rule);\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n // console.log('validate on %s value', value);\n if (validate) {\n if ((0, _util.isEmptyValue)(value) && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options);\n if (!(0, _util.isEmptyValue)(value)) {\n var dateObject = void 0;\n\n if (typeof value === 'number') {\n dateObject = new Date(value);\n } else {\n dateObject = value;\n }\n\n _rule2['default'].type(rule, dateObject, source, errors, options);\n if (dateObject) {\n _rule2['default'].range(rule, dateObject.getTime(), source, errors, options);\n }\n }\n }\n callback(errors);\n}\n\nexports['default'] = date;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction required(rule, value, callback, source, options) {\n var errors = [];\n var type = Array.isArray(value) ? 'array' : typeof value === 'undefined' ? 'undefined' : _typeof(value);\n _rule2['default'].required(rule, value, source, errors, options, type);\n callback(errors);\n}\n\nexports['default'] = required;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _rule = require('../rule/');\n\nvar _rule2 = _interopRequireDefault(_rule);\n\nvar _util = require('../util');\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }\n\nfunction type(rule, value, callback, source, options) {\n var ruleType = rule.type;\n var errors = [];\n var validate = rule.required || !rule.required && source.hasOwnProperty(rule.field);\n if (validate) {\n if ((0, _util.isEmptyValue)(value, ruleType) && !rule.required) {\n return callback();\n }\n _rule2['default'].required(rule, value, source, errors, options, ruleType);\n if (!(0, _util.isEmptyValue)(value, ruleType)) {\n _rule2['default'].type(rule, value, source, errors, options);\n }\n }\n callback(errors);\n}\n\nexports['default'] = type;","'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.newMessages = newMessages;\nfunction newMessages() {\n return {\n 'default': 'Validation error on field %s',\n required: '%s is required',\n 'enum': '%s must be one of %s',\n whitespace: '%s cannot be empty',\n date: {\n format: '%s date %s is invalid for format %s',\n parse: '%s date could not be parsed, %s is invalid ',\n invalid: '%s date %s is invalid'\n },\n types: {\n string: '%s is not a %s',\n method: '%s is not a %s (function)',\n array: '%s is not an %s',\n object: '%s is not an %s',\n number: '%s is not a %s',\n date: '%s is not a %s',\n boolean: '%s is not a %s',\n integer: '%s is not an %s',\n float: '%s is not a %s',\n regexp: '%s is not a valid %s',\n email: '%s is not a valid %s',\n url: '%s is not a valid %s',\n hex: '%s is not a valid %s'\n },\n string: {\n len: '%s must be exactly %s characters',\n min: '%s must be at least %s characters',\n max: '%s cannot be longer than %s characters',\n range: '%s must be between %s and %s characters'\n },\n number: {\n len: '%s must equal %s',\n min: '%s cannot be less than %s',\n max: '%s cannot be greater than %s',\n range: '%s must be between %s and %s'\n },\n array: {\n len: '%s must be exactly %s in length',\n min: '%s cannot be less than %s in length',\n max: '%s cannot be greater than %s in length',\n range: '%s must be between %s and %s in length'\n },\n pattern: {\n mismatch: '%s value %s does not match pattern %s'\n },\n clone: function clone() {\n var cloned = JSON.parse(JSON.stringify(this));\n cloned.clone = this.clone;\n return cloned;\n }\n };\n}\n\nvar messages = exports.messages = newMessages();"],"sourceRoot":""}