From 2be44f1b3248b4c0e2e504d807ac64835ddfb5f7 Mon Sep 17 00:00:00 2001 From: Christian Alfoni Date: Thu, 8 Oct 2015 09:31:59 +0200 Subject: [PATCH] React 0.14 support --- package.json | 4 ++-- release/formsy-react.js | 2 +- release/formsy-react.js.map | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0517d820..f6f37eea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "formsy-react", - "version": "0.16.0", + "version": "0.17.0", "description": "A form input builder and validator for React JS", "repository": { "type": "git", @@ -46,6 +46,6 @@ "webpack-dev-server": "^1.7.0" }, "peerDependencies": { - "react": "^0.14.0-rc1" + "react": "^0.14.0" } } diff --git a/release/formsy-react.js b/release/formsy-react.js index 924b4699..77f647b1 100644 --- a/release/formsy-react.js +++ b/release/formsy-react.js @@ -1,2 +1,2 @@ -!function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i(require("react")):"function"==typeof define&&define.amd?define(["react"],i):"object"==typeof exports?exports.Formsy=i(require("react")):t.Formsy=i(t.react)}(this,function(t){return function(t){function i(r){if(e[r])return e[r].exports;var s=e[r]={exports:{},id:r,loaded:!1};return t[r].call(s.exports,s,s.exports,i),s.loaded=!0,s.exports}var e={};return i.m=t,i.c=e,i.p="",i(0)}([function(t,i,e){(function(i){"use strict";var r=Object.assign||function(t){for(var i=1;i1)throw new Error("Formsy does not support multiple args on string validations. Use object format of validations instead.");return t[r]=e.length?e[0]:!0,t},{}):t||{}};t.exports={getInitialState:function(){return{_value:this.props.value,_isRequired:!1,_isValid:!0,_isPristine:!0,_pristineValue:this.props.value,_validationError:[],_externalError:null,_formSubmitted:!1}},contextTypes:{formsy:s.PropTypes.object},getDefaultProps:function(){return{validationError:"",validationErrors:{}}},componentWillMount:function(){var t=function(){this.setValidations(this.props.validations,this.props.required),this.context.formsy.attachToForm(this)}.bind(this);if(!this.props.name)throw new Error("Form Input requires a name property when used");t()},componentWillReceiveProps:function(t){this.setValidations(t.validations,t.required)},componentDidUpdate:function(t){r.isSame(this.props.value,t.value)||this.setValue(this.props.value),r.isSame(this.props.validations,t.validations)&&r.isSame(this.props.required,t.required)||this.context.formsy.validate(this)},componentWillUnmount:function(){this.context.formsy.detachFromForm(this)},setValidations:function(t,i){this._validations=n(t)||{},this._requiredValidations=i===!0?{isDefaultRequiredValue:!0}:n(i)},setValue:function(t){this.setState({_value:t,_isPristine:!1},function(){this.context.formsy.validate(this)}.bind(this))},resetValue:function(){this.setState({_value:this.state._pristineValue,_isPristine:!0},function(){this.context.formsy.validate(this)})},getValue:function(){return this.state._value},hasValue:function(){return""!==this.state._value},getErrorMessage:function(){var t=this.getErrorMessages();return t.length?t[0]:null},getErrorMessages:function(){return!this.isValid()||this.showRequired()?this.state._externalError||this.state._validationError||[]:[]},isFormDisabled:function(){return this.context.formsy.isFormDisabled()},isValid:function(){return this.state._isValid},isPristine:function(){return this.state._isPristine},isFormSubmitted:function(){return this.state._formSubmitted},isRequired:function(){return!!this.props.required},showRequired:function(){return this.state._isRequired},showError:function(){return!this.showRequired()&&!this.isValid()},isValidValue:function(t){return this.context.formsy.isValidValue.call(null,this,t)}}}).call(i,function(){return this}())},function(t,i){"use strict";t.exports={arraysDiffer:function(t,i){var e=!1;return t.length!==i.length?e=!0:t.forEach(function(t,r){this.isSame(t,i[r])||(e=!0)},this),e},objectsDiffer:function(t,i){var e=!1;return Object.keys(t).length!==Object.keys(i).length?e=!0:Object.keys(t).forEach(function(r){this.isSame(t[r],i[r])||(e=!0)},this),e},isSame:function(t,i){return typeof t!=typeof i?!1:Array.isArray(t)?!this.arraysDiffer(t,i):"object"==typeof t&&null!==t&&null!==i?!this.objectsDiffer(t,i):t===i}}},function(t,i,e){(function(i){"use strict";var r=Object.assign||function(t){for(var i=1;i=s}};t.exports=s},function(t,i){t.exports=function(t){return Object.keys(t).reduce(function(i,e){var r=e.match(/[^\[]*/i),s=e.match(/\[.*?\]/g)||[];s=[r[0]].concat(s).map(function(t){return t.replace(/\[|\]/g,"")});for(var n=i;s.length;){var u=s.shift();u in n?n=n[u]:(n[u]=s.length?isNaN(s[0])?{}:[]:t[e],n=n[u])}return i},{})}}])}); +!function(t,i){"object"==typeof exports&&"object"==typeof module?module.exports=i(require("react")):"function"==typeof define&&define.amd?define(["react"],i):"object"==typeof exports?exports.Formsy=i(require("react")):t.Formsy=i(t.react)}(this,function(t){return function(t){function i(r){if(e[r])return e[r].exports;var s=e[r]={exports:{},id:r,loaded:!1};return t[r].call(s.exports,s,s.exports,i),s.loaded=!0,s.exports}var e={};return i.m=t,i.c=e,i.p="",i(0)}([function(t,i,e){(function(i){"use strict";var r=Object.assign||function(t){for(var i=1;i1)throw new Error("Formsy does not support multiple args on string validations. Use object format of validations instead.");return t[r]=e.length?e[0]:!0,t},{}):t||{}};t.exports={getInitialState:function(){return{_value:this.props.value,_isRequired:!1,_isValid:!0,_isPristine:!0,_pristineValue:this.props.value,_validationError:[],_externalError:null,_formSubmitted:!1}},contextTypes:{formsy:s.PropTypes.object},getDefaultProps:function(){return{validationError:"",validationErrors:{}}},componentWillMount:function(){var t=function(){this.setValidations(this.props.validations,this.props.required),this.context.formsy.attachToForm(this)}.bind(this);if(!this.props.name)throw new Error("Form Input requires a name property when used");t()},componentWillReceiveProps:function(t){this.setValidations(t.validations,t.required)},componentDidUpdate:function(t){r.isSame(this.props.value,t.value)||this.setValue(this.props.value),r.isSame(this.props.validations,t.validations)&&r.isSame(this.props.required,t.required)||this.context.formsy.validate(this)},componentWillUnmount:function(){this.context.formsy.detachFromForm(this)},setValidations:function(t,i){this._validations=n(t)||{},this._requiredValidations=i===!0?{isDefaultRequiredValue:!0}:n(i)},setValue:function(t){this.setState({_value:t,_isPristine:!1},function(){this.context.formsy.validate(this)}.bind(this))},resetValue:function(){this.setState({_value:this.state._pristineValue,_isPristine:!0},function(){this.context.formsy.validate(this)})},getValue:function(){return this.state._value},hasValue:function(){return""!==this.state._value},getErrorMessage:function(){var t=this.getErrorMessages();return t.length?t[0]:null},getErrorMessages:function(){return!this.isValid()||this.showRequired()?this.state._externalError||this.state._validationError||[]:[]},isFormDisabled:function(){return this.context.formsy.isFormDisabled()},isValid:function(){return this.state._isValid},isPristine:function(){return this.state._isPristine},isFormSubmitted:function(){return this.state._formSubmitted},isRequired:function(){return!!this.props.required},showRequired:function(){return this.state._isRequired},showError:function(){return!this.showRequired()&&!this.isValid()},isValidValue:function(t){return this.context.formsy.isValidValue.call(null,this,t)}}}).call(i,function(){return this}())},function(t,i){"use strict";t.exports={arraysDiffer:function(t,i){var e=!1;return t.length!==i.length?e=!0:t.forEach(function(t,r){this.isSame(t,i[r])||(e=!0)},this),e},objectsDiffer:function(t,i){var e=!1;return Object.keys(t).length!==Object.keys(i).length?e=!0:Object.keys(t).forEach(function(r){this.isSame(t[r],i[r])||(e=!0)},this),e},isSame:function(t,i){return typeof t!=typeof i?!1:Array.isArray(t)?!this.arraysDiffer(t,i):"object"==typeof t&&null!==t&&null!==i?!this.objectsDiffer(t,i):t===i}}},function(t,i,e){(function(i){"use strict";var r=Object.assign||function(t){for(var i=1;i=s}};t.exports=s},function(t,i){t.exports=function(t){return Object.keys(t).reduce(function(i,e){var r=e.match(/[^\[]*/i),s=e.match(/\[.*?\]/g)||[];s=[r[0]].concat(s).map(function(t){return t.replace(/\[|\]/g,"")});for(var n=i;s.length;){var u=s.shift();u in n?n=n[u]:(n[u]=s.length?isNaN(s[0])?{}:[]:t[e],n=n[u])}return i},{})}}])}); //# sourceMappingURL=formsy-react.js.map \ No newline at end of file diff --git a/release/formsy-react.js.map b/release/formsy-react.js.map index 2d220508..15ea9c42 100644 --- a/release/formsy-react.js.map +++ b/release/formsy-react.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///formsy-react.js","webpack:///webpack/bootstrap c2760db04162c861118c","webpack:///./src/main.js","webpack:///external \"react\"","webpack:///./src/Mixin.js","webpack:///./src/utils.js","webpack:///./src/Decorator.js","webpack:///./src/HOC.js","webpack:///./src/validationRules.js","webpack:///./~/form-data-to-object/index.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_1__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","global","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","React","Formsy","validationRules","formDataToObject","utils","Mixin","HOC","Decorator","options","defaults","passedOptions","addValidationRule","name","func","Form","createClass","displayName","getInitialState","isValid","isSubmitting","canChange","getDefaultProps","onSuccess","onError","onSubmit","onValidSubmit","onInvalidSubmit","onSubmitted","onValid","onInvalid","onChange","validationErrors","preventExternalInvalidation","childContextTypes","formsy","PropTypes","object","getChildContext","attachToForm","detachFromForm","validate","isFormDisabled","isValidValue","component","value","runValidation","bind","componentWillMount","inputs","model","componentDidMount","validateForm","componentWillUpdate","prevInputKeys","keys","componentDidUpdate","props","setInputValidationErrors","newInputKeys","arraysDiffer","reset","data","setFormPristine","resetModel","submit","event","preventDefault","updateModel","mapModel","updateInputsWithError","state","mapping","reduce","mappedModel","keyArray","split","base","currentKey","shift","forEach","_value","setValue","resetValue","errors","index","args","_isValid","_validationError","setState","apply","isChanged","isSame","getPristineValues","getCurrentValues","Error","JSON","stringify","_externalError","disabled","isPristine","inputKeys","_formSubmitted","_isPristine","validation","_isRequired","isRequired","error","currentValues","validationError","validationResults","runRules","_validations","requiredResults","_requiredValidations","failed","success","map","filter","x","pos","arr","indexOf","validations","results","validationMethod","push","allIsValid","onValidationComplete","every","isMounted","render","createElement","children","convertValidationsToObject","validateMethod","arg","parse","e","_pristineValue","contextTypes","configure","setValidations","required","context","componentWillReceiveProps","nextProps","prevProps","componentWillUnmount","isDefaultRequiredValue","getValue","hasValue","getErrorMessage","messages","getErrorMessages","showRequired","isFormSubmitted","showError","a","b","isDifferent","item","objectsDiffer","Array","isArray","Component","mixins","_isExisty","undefined","isEmpty","values","isExisty","matchRegexp","regexp","test","isUndefined","isEmptyString","isEmail","isUrl","isTrue","isFalse","isNumeric","isAlpha","isAlphanumeric","isInt","isFloat","isWords","isSpecialWords","isLength","equals","eql","equalsField","field","maxLength","minLength","output","parentKey","match","paths","concat","replace","currentPath","pathKey","isNaN"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,UACA,kBAAAC,gBAAAC,IACAD,QAAA,SAAAJ,GACA,gBAAAC,SACAA,QAAA,OAAAD,EAAAG,QAAA,UAEAJ,EAAA,OAAAC,EAAAD,EAAA,QACCO,KAAA,SAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAT,OAGA,IAAAC,GAAAS,EAAAD,IACAT,WACAW,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAZ,EAAAD,QAAAC,IAAAD,QAAAQ,GAGAP,EAAAW,QAAA,EAGAX,EAAAD,QAvBA,GAAAU,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAASP,EAAQD,EAASQ,IAEH,SAASS,GAAS,YAE9C,IAAIC,GAAWC,OAAOC,QAAU,SAAUC,GAAU,IAAK,GAAIC,GAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,GAAIG,GAASF,UAAUD,EAAI,KAAK,GAAII,KAAOD,GAAcN,OAAOQ,UAAUC,eAAef,KAAKY,EAAQC,KAAQL,EAAOK,GAAOD,EAAOC,IAAY,MAAOL,IE1DpPQ,EAAQZ,EAAOY,OAASrB,EAAQ,GAChCsB,KACAC,EAAkBvB,EAAQ,GAC1BwB,EAAmBxB,EAAQ,GAC3ByB,EAAQzB,EAAQ,GAChB0B,EAAQ1B,EAAQ,GAChB2B,EAAM3B,EAAQ,GACd4B,EAAY5B,EAAQ,GACpB6B,IAEJP,GAAOI,MAAQA,EACfJ,EAAOK,IAAMA,E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SAAUjB,EAAQ7H,GAChC,MAAO8E,GAAYiD,YAAYF,EAAQ7H,EAAO,6BAEhD+I,SAAU,SAAUlB,EAAQ7H,EAAOjD,GACjC,OAAQ2K,EAAS1H,IAAU4H,EAAQ5H,IAAUA,EAAMjD,SAAWA,GAEhEiM,OAAQ,SAAUnB,EAAQ7H,EAAOiJ,GAC/B,OAAQvB,EAAS1H,IAAU4H,EAAQ5H,IAAUA,GAASiJ,GAExDC,YAAa,SAAUrB,EAAQ7H,EAAOmJ,GACpC,MAAOnJ,IAAS6H,EAAOsB,IAEzBC,UAAW,SAAUvB,EAAQ7H,EAAOjD,GAClC,OAAQ2K,EAAS1H,IAAUA,EAAMjD,QAAUA,GAE7CsM,UAAW,SAAUxB,EAAQ7H,EAAOjD,GAClC,OAAQ2K,EAAS1H,IAAU4H,EAAQ5H,IAAUA,EAAMjD,QAAUA,GAIjEvB,GAAOD,QAAUuJ,GR4yBX,SAAStJ,EAAQD,GSz3BvBC,EAAAD,QAAA,SAAAyB,GAIA,MAAAN,QAAAgE,KAAA1D,GAAA4E,OAAA,SAAA0H,EAAArM,GAEA,GAAAsM,GAAAtM,EAAAuM,MAAA,WACAC,EAAAxM,EAAAuM,MAAA,eACAC,IAAAF,EAAA,IAAAG,OAAAD,GAAAjF,IAAA,SAAAvH,GACA,MAAAA,GAAA0M,QAAA,cAIA,KADA,GAAAC,GAAAN,EACAG,EAAA1M,QAAA,CAEA,GAAA8M,GAAAJ,EAAAvH,OAEA2H,KAAAD,GACAA,IAAAC,IAEAD,EAAAC,GAAAJ,EAAA1M,OAAA+M,MAAAL,EAAA,UAAkEzM,EAAAC,GAClE2M,IAAAC,IAKA,MAAAP","file":"formsy-react.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Formsy\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"Formsy\"] = factory(root[\"react\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Formsy\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"Formsy\"] = factory(root[\"react\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar _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\t\n\tvar React = global.React || __webpack_require__(1);\n\tvar Formsy = {};\n\tvar validationRules = __webpack_require__(6);\n\tvar formDataToObject = __webpack_require__(7);\n\tvar utils = __webpack_require__(3);\n\tvar Mixin = __webpack_require__(2);\n\tvar HOC = __webpack_require__(5);\n\tvar Decorator = __webpack_require__(4);\n\tvar options = {};\n\t\n\tFormsy.Mixin = Mixin;\n\tFormsy.HOC = HOC;\n\tFormsy.Decorator = Decorator;\n\t\n\tFormsy.defaults = function (passedOptions) {\n\t options = passedOptions;\n\t};\n\t\n\tFormsy.addValidationRule = function (name, func) {\n\t validationRules[name] = func;\n\t};\n\t\n\tFormsy.Form = React.createClass({\n\t displayName: 'Formsy',\n\t getInitialState: function getInitialState() {\n\t return {\n\t isValid: true,\n\t isSubmitting: false,\n\t canChange: false\n\t };\n\t },\n\t getDefaultProps: function getDefaultProps() {\n\t return {\n\t onSuccess: function onSuccess() {},\n\t onError: function onError() {},\n\t onSubmit: function onSubmit() {},\n\t onValidSubmit: function onValidSubmit() {},\n\t onInvalidSubmit: function onInvalidSubmit() {},\n\t onSubmitted: function onSubmitted() {},\n\t onValid: function onValid() {},\n\t onInvalid: function onInvalid() {},\n\t onChange: function onChange() {},\n\t validationErrors: null,\n\t preventExternalInvalidation: false\n\t };\n\t },\n\t\n\t childContextTypes: {\n\t formsy: React.PropTypes.object\n\t },\n\t getChildContext: function getChildContext() {\n\t return {\n\t formsy: {\n\t attachToForm: this.attachToForm,\n\t detachFromForm: this.detachFromForm,\n\t validate: this.validate,\n\t isFormDisabled: this.isFormDisabled,\n\t isValidValue: (function (component, value) {\n\t return this.runValidation(component, value).isValid;\n\t }).bind(this)\n\t }\n\t };\n\t },\n\t\n\t // Add a map to store the inputs of the form, a model to store\n\t // the values of the form and register child inputs\n\t componentWillMount: function componentWillMount() {\n\t this.inputs = {};\n\t this.model = {};\n\t },\n\t\n\t componentDidMount: function componentDidMount() {\n\t this.validateForm();\n\t },\n\t\n\t componentWillUpdate: function componentWillUpdate() {\n\t\n\t // Keep a reference to input keys before form updates,\n\t // to check if inputs has changed after render\n\t this.prevInputKeys = Object.keys(this.inputs);\n\t },\n\t\n\t componentDidUpdate: function componentDidUpdate() {\n\t\n\t if (this.props.validationErrors) {\n\t this.setInputValidationErrors(this.props.validationErrors);\n\t }\n\t\n\t var newInputKeys = Object.keys(this.inputs);\n\t if (utils.arraysDiffer(this.prevInputKeys, newInputKeys)) {\n\t this.validateForm();\n\t }\n\t },\n\t\n\t // Allow resetting to specified data\n\t reset: function reset(data) {\n\t this.setFormPristine(true);\n\t this.resetModel(data);\n\t },\n\t\n\t // Update model, submit to url prop and send the model\n\t submit: function submit(event) {\n\t\n\t event && event.preventDefault();\n\t\n\t // Trigger form as not pristine.\n\t // If any inputs have not been touched yet this will make them dirty\n\t // so validation becomes visible (if based on isPristine)\n\t this.setFormPristine(false);\n\t this.updateModel();\n\t var model = this.mapModel();\n\t this.props.onSubmit(model, this.resetModel, this.updateInputsWithError);\n\t this.state.isValid ? this.props.onValidSubmit(model, this.resetModel, this.updateInputsWithError) : this.props.onInvalidSubmit(model, this.resetModel, this.updateInputsWithError);\n\t },\n\t\n\t mapModel: function mapModel() {\n\t if (this.props.mapping) {\n\t return this.props.mapping(this.model);\n\t } else {\n\t return formDataToObject(Object.keys(this.model).reduce((function (mappedModel, key) {\n\t\n\t var keyArray = key.split('.');\n\t var base = mappedModel;\n\t while (keyArray.length) {\n\t var currentKey = keyArray.shift();\n\t base = base[currentKey] = keyArray.length ? base[currentKey] || {} : this.model[key];\n\t }\n\t\n\t return mappedModel;\n\t }).bind(this), {}));\n\t }\n\t },\n\t\n\t // Goes through all registered components and\n\t // updates the model values\n\t updateModel: function updateModel() {\n\t Object.keys(this.inputs).forEach((function (name) {\n\t var component = this.inputs[name];\n\t this.model[name] = component.state._value;\n\t }).bind(this));\n\t },\n\t\n\t // Reset each key in the model to the original / initial / specified value\n\t resetModel: function resetModel(data) {\n\t Object.keys(this.inputs).forEach((function (name) {\n\t if (data && data[name]) {\n\t this.inputs[name].setValue(data[name]);\n\t } else {\n\t this.inputs[name].resetValue();\n\t }\n\t }).bind(this));\n\t this.validateForm();\n\t },\n\t\n\t setInputValidationErrors: function setInputValidationErrors(errors) {\n\t Object.keys(this.inputs).forEach((function (name, index) {\n\t var component = this.inputs[name];\n\t var args = [{\n\t _isValid: !(name in errors),\n\t _validationError: typeof errors[name] === 'string' ? [errors[name]] : errors[name]\n\t }];\n\t component.setState.apply(component, args);\n\t }).bind(this));\n\t },\n\t\n\t // Checks if the values have changed from their initial value\n\t isChanged: function isChanged() {\n\t return !utils.isSame(this.getPristineValues(), this.getCurrentValues());\n\t },\n\t\n\t getPristineValues: function getPristineValues() {\n\t var inputs = this.inputs;\n\t return Object.keys(inputs).reduce(function (data, name) {\n\t var component = inputs[name];\n\t data[name] = component.props.value;\n\t return data;\n\t }, {});\n\t },\n\t\n\t // Go through errors from server and grab the components\n\t // stored in the inputs map. Change their state to invalid\n\t // and set the serverError message\n\t updateInputsWithError: function updateInputsWithError(errors) {\n\t Object.keys(errors).forEach((function (name, index) {\n\t var component = this.inputs[name];\n\t\n\t if (!component) {\n\t throw new Error('You are trying to update an input that does not exist. Verify errors object with input names. ' + JSON.stringify(errors));\n\t }\n\t var args = [{\n\t _isValid: this.props.preventExternalInvalidation || false,\n\t _externalError: typeof errors[name] === 'string' ? [errors[name]] : errors[name]\n\t }];\n\t component.setState.apply(component, args);\n\t }).bind(this));\n\t },\n\t\n\t isFormDisabled: function isFormDisabled() {\n\t return this.props.disabled;\n\t },\n\t\n\t getCurrentValues: function getCurrentValues() {\n\t return Object.keys(this.inputs).reduce((function (data, name) {\n\t var component = this.inputs[name];\n\t data[name] = component.state._value;\n\t return data;\n\t }).bind(this), {});\n\t },\n\t\n\t setFormPristine: function setFormPristine(isPristine) {\n\t var inputs = this.inputs;\n\t var inputKeys = Object.keys(inputs);\n\t\n\t this.setState({\n\t _formSubmitted: !isPristine\n\t });\n\t\n\t // Iterate through each component and set it as pristine\n\t // or \"dirty\".\n\t inputKeys.forEach((function (name, index) {\n\t var component = inputs[name];\n\t component.setState({\n\t _formSubmitted: !isPristine,\n\t _isPristine: isPristine\n\t });\n\t }).bind(this));\n\t },\n\t\n\t // Use the binded values and the actual input value to\n\t // validate the input and set its state. Then check the\n\t // state of the form itself\n\t validate: function validate(component) {\n\t\n\t // Trigger onChange\n\t if (this.state.canChange) {\n\t this.props.onChange(this.getCurrentValues(), this.isChanged());\n\t }\n\t\n\t var validation = this.runValidation(component);\n\t // Run through the validations, split them up and call\n\t // the validator IF there is a value or it is required\n\t component.setState({\n\t _isValid: validation.isValid,\n\t _isRequired: validation.isRequired,\n\t _validationError: validation.error,\n\t _externalError: null\n\t }, this.validateForm);\n\t },\n\t\n\t // Checks validation on current value or a passed value\n\t runValidation: function runValidation(component, value) {\n\t\n\t var currentValues = this.getCurrentValues();\n\t var validationErrors = component.props.validationErrors;\n\t var validationError = component.props.validationError;\n\t value = arguments.length === 2 ? value : component.state._value;\n\t\n\t var validationResults = this.runRules(value, currentValues, component._validations);\n\t var requiredResults = this.runRules(value, currentValues, component._requiredValidations);\n\t\n\t // the component defines an explicit validate function\n\t if (typeof component.validate === \"function\") {\n\t validationResults.failed = component.validate() ? [] : ['failed'];\n\t }\n\t\n\t var isRequired = Object.keys(component._requiredValidations).length ? !!requiredResults.success.length : false;\n\t var isValid = !validationResults.failed.length && !(this.props.validationErrors && this.props.validationErrors[component.props.name]);\n\t\n\t return {\n\t isRequired: isRequired,\n\t isValid: isRequired ? false : isValid,\n\t error: (function () {\n\t\n\t if (isValid && !isRequired) {\n\t return [];\n\t }\n\t\n\t if (validationResults.errors.length) {\n\t return validationResults.errors;\n\t }\n\t\n\t if (this.props.validationErrors && this.props.validationErrors[component.props.name]) {\n\t return typeof this.props.validationErrors[component.props.name] === 'string' ? [this.props.validationErrors[component.props.name]] : this.props.validationErrors[component.props.name];\n\t }\n\t\n\t if (isRequired) {\n\t var error = validationErrors[requiredResults.success[0]];\n\t return error ? [error] : null;\n\t }\n\t\n\t if (validationResults.failed.length) {\n\t return validationResults.failed.map(function (failed) {\n\t return validationErrors[failed] ? validationErrors[failed] : validationError;\n\t }).filter(function (x, pos, arr) {\n\t // Remove duplicates\n\t return arr.indexOf(x) === pos;\n\t });\n\t }\n\t }).call(this)\n\t };\n\t },\n\t\n\t runRules: function runRules(value, currentValues, validations) {\n\t\n\t var results = {\n\t errors: [],\n\t failed: [],\n\t success: []\n\t };\n\t if (Object.keys(validations).length) {\n\t Object.keys(validations).forEach(function (validationMethod) {\n\t\n\t if (validationRules[validationMethod] && typeof validations[validationMethod] === 'function') {\n\t throw new Error('Formsy does not allow you to override default validations: ' + validationMethod);\n\t }\n\t\n\t if (!validationRules[validationMethod] && typeof validations[validationMethod] !== 'function') {\n\t throw new Error('Formsy does not have the validation rule: ' + validationMethod);\n\t }\n\t\n\t if (typeof validations[validationMethod] === 'function') {\n\t var validation = validations[validationMethod](currentValues, value);\n\t if (typeof validation === 'string') {\n\t results.errors.push(validation);\n\t results.failed.push(validationMethod);\n\t } else if (!validation) {\n\t results.failed.push(validationMethod);\n\t }\n\t return;\n\t } else if (typeof validations[validationMethod] !== 'function') {\n\t var validation = validationRules[validationMethod](currentValues, value, validations[validationMethod]);\n\t if (typeof validation === 'string') {\n\t results.errors.push(validation);\n\t results.failed.push(validationMethod);\n\t } else if (!validation) {\n\t results.failed.push(validationMethod);\n\t } else {\n\t results.success.push(validationMethod);\n\t }\n\t return;\n\t }\n\t\n\t return results.success.push(validationMethod);\n\t });\n\t }\n\t\n\t return results;\n\t },\n\t\n\t // Validate the form by going through all child input components\n\t // and check their state\n\t validateForm: function validateForm() {\n\t var allIsValid;\n\t var inputs = this.inputs;\n\t var inputKeys = Object.keys(inputs);\n\t\n\t // We need a callback as we are validating all inputs again. This will\n\t // run when the last component has set its state\n\t var onValidationComplete = (function () {\n\t allIsValid = inputKeys.every((function (name) {\n\t return inputs[name].state._isValid;\n\t }).bind(this));\n\t\n\t this.setState({\n\t isValid: allIsValid\n\t });\n\t\n\t if (allIsValid) {\n\t this.props.onValid();\n\t } else {\n\t this.props.onInvalid();\n\t }\n\t\n\t // Tell the form that it can start to trigger change events\n\t this.setState({\n\t canChange: true\n\t });\n\t }).bind(this);\n\t\n\t // Run validation again in case affected by other inputs. The\n\t // last component validated will run the onValidationComplete callback\n\t inputKeys.forEach((function (name, index) {\n\t var component = inputs[name];\n\t var validation = this.runValidation(component);\n\t if (validation.isValid && component.state._externalError) {\n\t validation.isValid = false;\n\t }\n\t component.setState({\n\t _isValid: validation.isValid,\n\t _isRequired: validation.isRequired,\n\t _validationError: validation.error,\n\t _externalError: !validation.isValid && component.state._externalError ? component.state._externalError : null\n\t }, index === inputKeys.length - 1 ? onValidationComplete : null);\n\t }).bind(this));\n\t\n\t // If there are no inputs, set state where form is ready to trigger\n\t // change event. New inputs might be added later\n\t if (!inputKeys.length && this.isMounted()) {\n\t this.setState({\n\t canChange: true\n\t });\n\t }\n\t },\n\t\n\t // Method put on each input component to register\n\t // itself to the form\n\t attachToForm: function attachToForm(component) {\n\t this.inputs[component.props.name] = component;\n\t this.model[component.props.name] = component.state._value;\n\t this.validate(component);\n\t },\n\t\n\t // Method put on each input component to unregister\n\t // itself from the form\n\t detachFromForm: function detachFromForm(component) {\n\t delete this.inputs[component.props.name];\n\t delete this.model[component.props.name];\n\t this.validateForm();\n\t },\n\t render: function render() {\n\t\n\t return React.createElement(\n\t 'form',\n\t _extends({}, this.props, { onSubmit: this.submit }),\n\t this.props.children\n\t );\n\t }\n\t});\n\t\n\tif (!global.exports && !global.module && (!global.define || !global.define.amd)) {\n\t global.Formsy = Formsy;\n\t}\n\t\n\tmodule.exports = Formsy;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar utils = __webpack_require__(3);\n\tvar React = global.React || __webpack_require__(1);\n\t\n\tvar convertValidationsToObject = function convertValidationsToObject(validations) {\n\t\n\t if (typeof validations === 'string') {\n\t\n\t return validations.split(/\\,(?![^{\\[]*[}\\]])/g).reduce(function (validations, validation) {\n\t var args = validation.split(':');\n\t var validateMethod = args.shift();\n\t\n\t args = args.map(function (arg) {\n\t try {\n\t return JSON.parse(arg);\n\t } catch (e) {\n\t return arg; // It is a string if it can not parse it\n\t }\n\t });\n\t\n\t if (args.length > 1) {\n\t throw new Error('Formsy does not support multiple args on string validations. Use object format of validations instead.');\n\t }\n\t\n\t validations[validateMethod] = args.length ? args[0] : true;\n\t return validations;\n\t }, {});\n\t }\n\t\n\t return validations || {};\n\t};\n\t\n\tmodule.exports = {\n\t getInitialState: function getInitialState() {\n\t return {\n\t _value: this.props.value,\n\t _isRequired: false,\n\t _isValid: true,\n\t _isPristine: true,\n\t _pristineValue: this.props.value,\n\t _validationError: [],\n\t _externalError: null,\n\t _formSubmitted: false\n\t };\n\t },\n\t contextTypes: {\n\t formsy: React.PropTypes.object // What about required?\n\t },\n\t getDefaultProps: function getDefaultProps() {\n\t return {\n\t validationError: '',\n\t validationErrors: {}\n\t };\n\t },\n\t\n\t componentWillMount: function componentWillMount() {\n\t var configure = (function () {\n\t this.setValidations(this.props.validations, this.props.required);\n\t\n\t // Pass a function instead?\n\t this.context.formsy.attachToForm(this);\n\t //this.props._attachToForm(this);\n\t }).bind(this);\n\t\n\t if (!this.props.name) {\n\t throw new Error('Form Input requires a name property when used');\n\t }\n\t\n\t /*\n\t if (!this.props._attachToForm) {\n\t return setTimeout(function () {\n\t if (!this.isMounted()) return;\n\t if (!this.props._attachToForm) {\n\t throw new Error('Form Mixin requires component to be nested in a Form');\n\t }\n\t configure();\n\t }.bind(this), 0);\n\t }\n\t */\n\t configure();\n\t },\n\t\n\t // We have to make the validate method is kept when new props are added\n\t componentWillReceiveProps: function componentWillReceiveProps(nextProps) {\n\t this.setValidations(nextProps.validations, nextProps.required);\n\t },\n\t\n\t componentDidUpdate: function componentDidUpdate(prevProps) {\n\t\n\t // If the value passed has changed, set it. If value is not passed it will\n\t // internally update, and this will never run\n\t if (!utils.isSame(this.props.value, prevProps.value)) {\n\t this.setValue(this.props.value);\n\t }\n\t\n\t // If validations or required is changed, run a new validation\n\t if (!utils.isSame(this.props.validations, prevProps.validations) || !utils.isSame(this.props.required, prevProps.required)) {\n\t this.context.formsy.validate(this);\n\t }\n\t },\n\t\n\t // Detach it when component unmounts\n\t componentWillUnmount: function componentWillUnmount() {\n\t this.context.formsy.detachFromForm(this);\n\t //this.props._detachFromForm(this);\n\t },\n\t\n\t setValidations: function setValidations(validations, required) {\n\t\n\t // Add validations to the store itself as the props object can not be modified\n\t this._validations = convertValidationsToObject(validations) || {};\n\t this._requiredValidations = required === true ? { isDefaultRequiredValue: true } : convertValidationsToObject(required);\n\t },\n\t\n\t // We validate after the value has been set\n\t setValue: function setValue(value) {\n\t this.setState({\n\t _value: value,\n\t _isPristine: false\n\t }, (function () {\n\t this.context.formsy.validate(this);\n\t //this.props._validate(this);\n\t }).bind(this));\n\t },\n\t resetValue: function resetValue() {\n\t this.setState({\n\t _value: this.state._pristineValue,\n\t _isPristine: true\n\t }, function () {\n\t this.context.formsy.validate(this);\n\t //this.props._validate(this);\n\t });\n\t },\n\t getValue: function getValue() {\n\t return this.state._value;\n\t },\n\t hasValue: function hasValue() {\n\t return this.state._value !== '';\n\t },\n\t getErrorMessage: function getErrorMessage() {\n\t var messages = this.getErrorMessages();\n\t return messages.length ? messages[0] : null;\n\t },\n\t getErrorMessages: function getErrorMessages() {\n\t return !this.isValid() || this.showRequired() ? this.state._externalError || this.state._validationError || [] : [];\n\t },\n\t isFormDisabled: function isFormDisabled() {\n\t return this.context.formsy.isFormDisabled();\n\t //return this.props._isFormDisabled();\n\t },\n\t isValid: function isValid() {\n\t return this.state._isValid;\n\t },\n\t isPristine: function isPristine() {\n\t return this.state._isPristine;\n\t },\n\t isFormSubmitted: function isFormSubmitted() {\n\t return this.state._formSubmitted;\n\t },\n\t isRequired: function isRequired() {\n\t return !!this.props.required;\n\t },\n\t showRequired: function showRequired() {\n\t return this.state._isRequired;\n\t },\n\t showError: function showError() {\n\t return !this.showRequired() && !this.isValid();\n\t },\n\t isValidValue: function isValidValue(value) {\n\t return this.context.formsy.isValidValue.call(null, this, value);\n\t //return this.props._isValidValue.call(null, this, value);\n\t }\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = {\n\t arraysDiffer: function arraysDiffer(a, b) {\n\t var isDifferent = false;\n\t if (a.length !== b.length) {\n\t isDifferent = true;\n\t } else {\n\t a.forEach(function (item, index) {\n\t if (!this.isSame(item, b[index])) {\n\t isDifferent = true;\n\t }\n\t }, this);\n\t }\n\t return isDifferent;\n\t },\n\t\n\t objectsDiffer: function objectsDiffer(a, b) {\n\t var isDifferent = false;\n\t if (Object.keys(a).length !== Object.keys(b).length) {\n\t isDifferent = true;\n\t } else {\n\t Object.keys(a).forEach(function (key) {\n\t if (!this.isSame(a[key], b[key])) {\n\t isDifferent = true;\n\t }\n\t }, this);\n\t }\n\t return isDifferent;\n\t },\n\t\n\t isSame: function isSame(a, b) {\n\t if (typeof a !== typeof b) {\n\t return false;\n\t } else if (Array.isArray(a)) {\n\t return !this.arraysDiffer(a, b);\n\t } else if (typeof a === 'object' && a !== null && b !== null) {\n\t return !this.objectsDiffer(a, b);\n\t }\n\t\n\t return a === b;\n\t }\n\t};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar _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\t\n\tvar React = global.React || __webpack_require__(1);\n\tvar Mixin = __webpack_require__(2);\n\tmodule.exports = function () {\n\t return function (Component) {\n\t return React.createClass({\n\t mixins: [Mixin],\n\t render: function render() {\n\t return React.createElement(Component, _extends({\n\t setValidations: this.setValidations,\n\t setValue: this.setValue,\n\t resetValue: this.resetValue,\n\t getValue: this.getValue,\n\t hasValue: this.hasValue,\n\t getErrorMessage: this.getErrorMessage,\n\t getErrorMessages: this.getErrorMessages,\n\t isFormDisabled: this.isFormDisabled,\n\t isValid: this.isValid,\n\t isPristine: this.isPristine,\n\t isFormSubmitted: this.isFormSubmitted,\n\t isRequired: this.isRequired,\n\t showRequired: this.showRequired,\n\t showError: this.showError,\n\t isValidValue: this.isValidValue\n\t }, this.props));\n\t }\n\t });\n\t };\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar React = global.React || __webpack_require__(1);\n\tvar Mixin = __webpack_require__(2);\n\tmodule.exports = function (Component) {\n\t return React.createClass({\n\t mixins: [Mixin],\n\t render: function render() {\n\t return React.createElement(Component, {\n\t setValidations: this.setValidations,\n\t setValue: this.setValue,\n\t resetValue: this.resetValue,\n\t getValue: this.getValue,\n\t hasValue: this.hasValue,\n\t getErrorMessage: this.getErrorMessage,\n\t getErrorMessages: this.getErrorMessages,\n\t isFormDisabled: this.isFormDisabled,\n\t isValid: this.isValid,\n\t isPristine: this.isPristine,\n\t isFormSubmitted: this.isFormSubmitted,\n\t isRequired: this.isRequired,\n\t showRequired: this.showRequired,\n\t showError: this.showError,\n\t isValidValue: this.isValidValue\n\t });\n\t }\n\t });\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 6 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tvar _isExisty = function _isExisty(value) {\n\t return value !== null && value !== undefined;\n\t};\n\t\n\tvar isEmpty = function isEmpty(value) {\n\t return value === '';\n\t};\n\t\n\tvar validations = {\n\t isDefaultRequiredValue: function isDefaultRequiredValue(values, value) {\n\t return value === undefined || value === '';\n\t },\n\t isExisty: function isExisty(values, value) {\n\t return _isExisty(value);\n\t },\n\t matchRegexp: function matchRegexp(values, value, regexp) {\n\t return !_isExisty(value) || isEmpty(value) || regexp.test(value);\n\t },\n\t isUndefined: function isUndefined(values, value) {\n\t return value === undefined;\n\t },\n\t isEmptyString: function isEmptyString(values, value) {\n\t return isEmpty(value);\n\t },\n\t isEmail: function isEmail(values, value) {\n\t return validations.matchRegexp(values, value, /^((([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);\n\t },\n\t isUrl: function isUrl(values, value) {\n\t return validations.matchRegexp(values, value, /^(https?|s?ftp):\\/\\/(((([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);\n\t },\n\t isTrue: function isTrue(values, value) {\n\t return value === true;\n\t },\n\t isFalse: function isFalse(values, value) {\n\t return value === false;\n\t },\n\t isNumeric: function isNumeric(values, value) {\n\t if (typeof value === 'number') {\n\t return true;\n\t }\n\t return validations.matchRegexp(values, value, /^[-+]?(?:\\d*[.])?\\d+$/);\n\t },\n\t isAlpha: function isAlpha(values, value) {\n\t return validations.matchRegexp(values, value, /^[A-Z]+$/i);\n\t },\n\t isAlphanumeric: function isAlphanumeric(values, value) {\n\t return validations.matchRegexp(values, value, /^[0-9A-Z]+$/i);\n\t },\n\t isInt: function isInt(values, value) {\n\t return validations.matchRegexp(values, value, /^(?:[-+]?(?:0|[1-9]\\d*))$/);\n\t },\n\t isFloat: function isFloat(values, value) {\n\t return validations.matchRegexp(values, value, /^(?:[-+]?(?:\\d+))?(?:\\.\\d*)?(?:[eE][\\+\\-]?(?:\\d+))?$/);\n\t },\n\t isWords: function isWords(values, value) {\n\t return validations.matchRegexp(values, value, /^[A-Z\\s]+$/i);\n\t },\n\t isSpecialWords: function isSpecialWords(values, value) {\n\t return validations.matchRegexp(values, value, /^[A-Z\\s\\u00C0-\\u017F]+$/i);\n\t },\n\t isLength: function isLength(values, value, length) {\n\t return !_isExisty(value) || isEmpty(value) || value.length === length;\n\t },\n\t equals: function equals(values, value, eql) {\n\t return !_isExisty(value) || isEmpty(value) || value == eql;\n\t },\n\t equalsField: function equalsField(values, value, field) {\n\t return value == values[field];\n\t },\n\t maxLength: function maxLength(values, value, length) {\n\t return !_isExisty(value) || value.length <= length;\n\t },\n\t minLength: function minLength(values, value, length) {\n\t return !_isExisty(value) || isEmpty(value) || value.length >= length;\n\t }\n\t};\n\t\n\tmodule.exports = validations;\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function (source) {\n\t\n\t\n\t // \"foo[0]\"\n\t return Object.keys(source).reduce(function (output, key) {\n\t\n\t var parentKey = key.match(/[^\\[]*/i);\n\t var paths = key.match(/\\[.*?\\]/g) || [];\n\t paths = [parentKey[0]].concat(paths).map(function (key) {\n\t return key.replace(/\\[|\\]/g, '');\n\t });\n\t\n\t var currentPath = output;\n\t while (paths.length) {\n\t\n\t var pathKey = paths.shift();\n\t\n\t if (pathKey in currentPath) {\n\t currentPath = currentPath[pathKey];\n\t } else {\n\t currentPath[pathKey] = paths.length ? isNaN(paths[0]) ? {} : [] : source[key];\n\t currentPath = currentPath[pathKey];\n\t }\n\t\n\t }\n\t\n\t return output;\n\t\n\t }, {});\n\t\n\t};\n\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** formsy-react.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap c2760db04162c861118c\n **/","var React = global.React || require('react');\nvar Formsy = {};\nvar validationRules = require('./validationRules.js');\nvar formDataToObject = require('form-data-to-object');\nvar utils = require('./utils.js');\nvar Mixin = require('./Mixin.js');\nvar HOC = require('./HOC.js');\nvar Decorator = require('./Decorator.js');\nvar options = {};\n\nFormsy.Mixin = Mixin;\nFormsy.HOC = HOC;\nFormsy.Decorator = Decorator;\n\nFormsy.defaults = function (passedOptions) {\n options = passedOptions;\n};\n\nFormsy.addValidationRule = function (name, func) {\n validationRules[name] = func;\n};\n\nFormsy.Form = React.createClass({\n displayName: 'Formsy',\n getInitialState: function () {\n return {\n isValid: true,\n isSubmitting: false,\n canChange: false\n };\n },\n getDefaultProps: function () {\n return {\n onSuccess: function () {},\n onError: function () {},\n onSubmit: function () {},\n onValidSubmit: function () {},\n onInvalidSubmit: function () {},\n onSubmitted: function () {},\n onValid: function () {},\n onInvalid: function () {},\n onChange: function () {},\n validationErrors: null,\n preventExternalInvalidation: false\n };\n },\n\n childContextTypes: {\n formsy: React.PropTypes.object\n },\n getChildContext: function () {\n return {\n formsy: {\n attachToForm: this.attachToForm,\n detachFromForm: this.detachFromForm,\n validate: this.validate,\n isFormDisabled: this.isFormDisabled,\n isValidValue: function (component, value) {\n return this.runValidation(component, value).isValid;\n }.bind(this)\n }\n }\n },\n\n // Add a map to store the inputs of the form, a model to store\n // the values of the form and register child inputs\n componentWillMount: function () {\n this.inputs = {};\n this.model = {};\n },\n\n componentDidMount: function () {\n this.validateForm();\n },\n\n componentWillUpdate: function () {\n\n // Keep a reference to input keys before form updates,\n // to check if inputs has changed after render\n this.prevInputKeys = Object.keys(this.inputs);\n\n },\n\n componentDidUpdate: function () {\n\n if (this.props.validationErrors) {\n this.setInputValidationErrors(this.props.validationErrors);\n }\n\n var newInputKeys = Object.keys(this.inputs);\n if (utils.arraysDiffer(this.prevInputKeys, newInputKeys)) {\n this.validateForm();\n }\n\n },\n\n // Allow resetting to specified data\n reset: function (data) {\n this.setFormPristine(true);\n this.resetModel(data);\n },\n\n // Update model, submit to url prop and send the model\n submit: function (event) {\n\n event && event.preventDefault();\n\n // Trigger form as not pristine.\n // If any inputs have not been touched yet this will make them dirty\n // so validation becomes visible (if based on isPristine)\n this.setFormPristine(false);\n this.updateModel();\n var model = this.mapModel();\n this.props.onSubmit(model, this.resetModel, this.updateInputsWithError);\n this.state.isValid ? this.props.onValidSubmit(model, this.resetModel, this.updateInputsWithError) : this.props.onInvalidSubmit(model, this.resetModel, this.updateInputsWithError);\n\n },\n\n mapModel: function () {\n if (this.props.mapping) {\n return this.props.mapping(this.model)\n } else {\n return formDataToObject(Object.keys(this.model).reduce(function (mappedModel, key) {\n\n var keyArray = key.split('.');\n var base = mappedModel;\n while (keyArray.length) {\n var currentKey = keyArray.shift();\n base = (base[currentKey] = keyArray.length ? base[currentKey] || {} : this.model[key]);\n }\n\n return mappedModel;\n\n }.bind(this), {}));\n }\n },\n\n // Goes through all registered components and\n // updates the model values\n updateModel: function () {\n Object.keys(this.inputs).forEach(function (name) {\n var component = this.inputs[name];\n this.model[name] = component.state._value;\n }.bind(this));\n },\n\n // Reset each key in the model to the original / initial / specified value\n resetModel: function (data) {\n Object.keys(this.inputs).forEach(function (name) {\n if (data && data[name]) {\n this.inputs[name].setValue(data[name]);\n } else {\n this.inputs[name].resetValue();\n }\n }.bind(this));\n this.validateForm();\n },\n\n setInputValidationErrors: function (errors) {\n Object.keys(this.inputs).forEach(function (name, index) {\n var component = this.inputs[name];\n var args = [{\n _isValid: !(name in errors),\n _validationError: typeof errors[name] === 'string' ? [errors[name]] : errors[name]\n }];\n component.setState.apply(component, args);\n }.bind(this));\n },\n\n // Checks if the values have changed from their initial value\n isChanged: function() {\n return !utils.isSame(this.getPristineValues(), this.getCurrentValues());\n },\n\n getPristineValues: function() {\n var inputs = this.inputs;\n return Object.keys(inputs).reduce(function (data, name) {\n var component = inputs[name];\n data[name] = component.props.value;\n return data;\n }, {});\n },\n\n // Go through errors from server and grab the components\n // stored in the inputs map. Change their state to invalid\n // and set the serverError message\n updateInputsWithError: function (errors) {\n Object.keys(errors).forEach(function (name, index) {\n var component = this.inputs[name];\n\n if (!component) {\n throw new Error('You are trying to update an input that does not exist. Verify errors object with input names. ' + JSON.stringify(errors));\n }\n var args = [{\n _isValid: this.props.preventExternalInvalidation || false,\n _externalError: typeof errors[name] === 'string' ? [errors[name]] : errors[name]\n }];\n component.setState.apply(component, args);\n }.bind(this));\n },\n\n isFormDisabled: function () {\n return this.props.disabled;\n },\n\n getCurrentValues: function () {\n return Object.keys(this.inputs).reduce(function (data, name) {\n var component = this.inputs[name];\n data[name] = component.state._value;\n return data;\n }.bind(this), {});\n },\n\n setFormPristine: function (isPristine) {\n var inputs = this.inputs;\n var inputKeys = Object.keys(inputs);\n\n this.setState({\n _formSubmitted: !isPristine\n })\n\n // Iterate through each component and set it as pristine\n // or \"dirty\".\n inputKeys.forEach(function (name, index) {\n var component = inputs[name];\n component.setState({\n _formSubmitted: !isPristine,\n _isPristine: isPristine\n });\n }.bind(this));\n },\n\n // Use the binded values and the actual input value to\n // validate the input and set its state. Then check the\n // state of the form itself\n validate: function (component) {\n\n // Trigger onChange\n if (this.state.canChange) {\n this.props.onChange(this.getCurrentValues(), this.isChanged());\n }\n\n var validation = this.runValidation(component);\n // Run through the validations, split them up and call\n // the validator IF there is a value or it is required\n component.setState({\n _isValid: validation.isValid,\n _isRequired: validation.isRequired,\n _validationError: validation.error,\n _externalError: null\n }, this.validateForm);\n\n },\n\n // Checks validation on current value or a passed value\n runValidation: function (component, value) {\n\n var currentValues = this.getCurrentValues();\n var validationErrors = component.props.validationErrors;\n var validationError = component.props.validationError;\n value = arguments.length === 2 ? value : component.state._value;\n\n var validationResults = this.runRules(value, currentValues, component._validations);\n var requiredResults = this.runRules(value, currentValues, component._requiredValidations);\n\n // the component defines an explicit validate function\n if (typeof component.validate === \"function\") {\n validationResults.failed = component.validate() ? [] : ['failed'];\n }\n\n var isRequired = Object.keys(component._requiredValidations).length ? !!requiredResults.success.length : false;\n var isValid = !validationResults.failed.length && !(this.props.validationErrors && this.props.validationErrors[component.props.name]);\n\n return {\n isRequired: isRequired,\n isValid: isRequired ? false : isValid,\n error: (function () {\n\n if (isValid && !isRequired) {\n return [];\n }\n\n if (validationResults.errors.length) {\n return validationResults.errors;\n }\n\n if (this.props.validationErrors && this.props.validationErrors[component.props.name]) {\n return typeof this.props.validationErrors[component.props.name] === 'string' ? [this.props.validationErrors[component.props.name]] : this.props.validationErrors[component.props.name];\n }\n\n if (isRequired) {\n var error = validationErrors[requiredResults.success[0]];\n return error ? [error] : null;\n }\n\n if (validationResults.failed.length) {\n return validationResults.failed.map(function(failed) {\n return validationErrors[failed] ? validationErrors[failed] : validationError;\n }).filter(function(x, pos, arr) {\n // Remove duplicates\n return arr.indexOf(x) === pos;\n });\n }\n\n }.call(this))\n };\n\n },\n\n runRules: function (value, currentValues, validations) {\n\n var results = {\n errors: [],\n failed: [],\n success: []\n };\n if (Object.keys(validations).length) {\n Object.keys(validations).forEach(function (validationMethod) {\n\n if (validationRules[validationMethod] && typeof validations[validationMethod] === 'function') {\n throw new Error('Formsy does not allow you to override default validations: ' + validationMethod);\n }\n\n if (!validationRules[validationMethod] && typeof validations[validationMethod] !== 'function') {\n throw new Error('Formsy does not have the validation rule: ' + validationMethod);\n }\n\n if (typeof validations[validationMethod] === 'function') {\n var validation = validations[validationMethod](currentValues, value);\n if (typeof validation === 'string') {\n results.errors.push(validation);\n results.failed.push(validationMethod);\n } else if (!validation) {\n results.failed.push(validationMethod);\n }\n return;\n\n } else if (typeof validations[validationMethod] !== 'function') {\n var validation = validationRules[validationMethod](currentValues, value, validations[validationMethod]);\n if (typeof validation === 'string') {\n results.errors.push(validation);\n results.failed.push(validationMethod);\n } else if (!validation) {\n results.failed.push(validationMethod);\n } else {\n results.success.push(validationMethod);\n }\n return;\n\n }\n\n return results.success.push(validationMethod);\n\n });\n }\n\n return results;\n\n },\n\n // Validate the form by going through all child input components\n // and check their state\n validateForm: function () {\n var allIsValid;\n var inputs = this.inputs;\n var inputKeys = Object.keys(inputs);\n\n // We need a callback as we are validating all inputs again. This will\n // run when the last component has set its state\n var onValidationComplete = function () {\n allIsValid = inputKeys.every(function (name) {\n return inputs[name].state._isValid;\n }.bind(this));\n\n this.setState({\n isValid: allIsValid\n });\n\n if (allIsValid) {\n this.props.onValid();\n } else {\n this.props.onInvalid();\n }\n\n // Tell the form that it can start to trigger change events\n this.setState({\n canChange: true\n });\n\n }.bind(this);\n\n // Run validation again in case affected by other inputs. The\n // last component validated will run the onValidationComplete callback\n inputKeys.forEach(function (name, index) {\n var component = inputs[name];\n var validation = this.runValidation(component);\n if (validation.isValid && component.state._externalError) {\n validation.isValid = false;\n }\n component.setState({\n _isValid: validation.isValid,\n _isRequired: validation.isRequired,\n _validationError: validation.error,\n _externalError: !validation.isValid && component.state._externalError ? component.state._externalError : null\n }, index === inputKeys.length - 1 ? onValidationComplete : null);\n }.bind(this));\n\n // If there are no inputs, set state where form is ready to trigger\n // change event. New inputs might be added later\n if (!inputKeys.length && this.isMounted()) {\n this.setState({\n canChange: true\n });\n }\n },\n\n // Method put on each input component to register\n // itself to the form\n attachToForm: function (component) {\n this.inputs[component.props.name] = component;\n this.model[component.props.name] = component.state._value;\n this.validate(component);\n },\n\n // Method put on each input component to unregister\n // itself from the form\n detachFromForm: function (component) {\n delete this.inputs[component.props.name];\n delete this.model[component.props.name];\n this.validateForm();\n },\n render: function () {\n\n return (\n
\n {this.props.children}\n
\n );\n\n }\n});\n\nif (!global.exports && !global.module && (!global.define || !global.define.amd)) {\n global.Formsy = Formsy;\n}\n\nmodule.exports = Formsy;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main.js\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"react\"\n ** module id = 1\n ** module chunks = 0\n **/","var utils = require('./utils.js');\nvar React = global.React || require('react');\n\nvar convertValidationsToObject = function (validations) {\n\n if (typeof validations === 'string') {\n\n return validations.split(/\\,(?![^{\\[]*[}\\]])/g).reduce(function (validations, validation) {\n var args = validation.split(':');\n var validateMethod = args.shift();\n\n args = args.map(function (arg) {\n try {\n return JSON.parse(arg);\n } catch (e) {\n return arg; // It is a string if it can not parse it\n }\n });\n\n if (args.length > 1) {\n throw new Error('Formsy does not support multiple args on string validations. Use object format of validations instead.');\n }\n\n validations[validateMethod] = args.length ? args[0] : true;\n return validations;\n }, {});\n\n }\n\n return validations || {};\n};\n\nmodule.exports = {\n getInitialState: function () {\n return {\n _value: this.props.value,\n _isRequired: false,\n _isValid: true,\n _isPristine: true,\n _pristineValue: this.props.value,\n _validationError: [],\n _externalError: null,\n _formSubmitted: false\n };\n },\n contextTypes: {\n formsy: React.PropTypes.object // What about required?\n },\n getDefaultProps: function () {\n return {\n validationError: '',\n validationErrors: {}\n };\n },\n\n componentWillMount: function () {\n var configure = function () {\n this.setValidations(this.props.validations, this.props.required);\n\n // Pass a function instead?\n this.context.formsy.attachToForm(this);\n //this.props._attachToForm(this);\n }.bind(this);\n\n if (!this.props.name) {\n throw new Error('Form Input requires a name property when used');\n }\n\n /*\n if (!this.props._attachToForm) {\n return setTimeout(function () {\n if (!this.isMounted()) return;\n if (!this.props._attachToForm) {\n throw new Error('Form Mixin requires component to be nested in a Form');\n }\n configure();\n }.bind(this), 0);\n }\n */\n configure();\n },\n\n // We have to make the validate method is kept when new props are added\n componentWillReceiveProps: function (nextProps) {\n this.setValidations(nextProps.validations, nextProps.required);\n\n },\n\n componentDidUpdate: function (prevProps) {\n\n // If the value passed has changed, set it. If value is not passed it will\n // internally update, and this will never run\n if (!utils.isSame(this.props.value, prevProps.value)) {\n this.setValue(this.props.value);\n }\n\n // If validations or required is changed, run a new validation\n if (!utils.isSame(this.props.validations, prevProps.validations) || !utils.isSame(this.props.required, prevProps.required)) {\n this.context.formsy.validate(this);\n }\n },\n\n // Detach it when component unmounts\n componentWillUnmount: function () {\n this.context.formsy.detachFromForm(this);\n //this.props._detachFromForm(this);\n },\n\n setValidations: function (validations, required) {\n\n // Add validations to the store itself as the props object can not be modified\n this._validations = convertValidationsToObject(validations) || {};\n this._requiredValidations = required === true ? {isDefaultRequiredValue: true} : convertValidationsToObject(required);\n\n },\n\n // We validate after the value has been set\n setValue: function (value) {\n this.setState({\n _value: value,\n _isPristine: false\n }, function () {\n this.context.formsy.validate(this);\n //this.props._validate(this);\n }.bind(this));\n },\n resetValue: function () {\n this.setState({\n _value: this.state._pristineValue,\n _isPristine: true\n }, function () {\n this.context.formsy.validate(this);\n //this.props._validate(this);\n });\n },\n getValue: function () {\n return this.state._value;\n },\n hasValue: function () {\n return this.state._value !== '';\n },\n getErrorMessage: function () {\n var messages = this.getErrorMessages();\n return messages.length ? messages[0] : null;\n },\n getErrorMessages: function () {\n return !this.isValid() || this.showRequired() ? (this.state._externalError || this.state._validationError || []) : [];\n },\n isFormDisabled: function () {\n return this.context.formsy.isFormDisabled();\n //return this.props._isFormDisabled();\n },\n isValid: function () {\n return this.state._isValid;\n },\n isPristine: function () {\n return this.state._isPristine;\n },\n isFormSubmitted: function () {\n return this.state._formSubmitted;\n },\n isRequired: function () {\n return !!this.props.required;\n },\n showRequired: function () {\n return this.state._isRequired;\n },\n showError: function () {\n return !this.showRequired() && !this.isValid();\n },\n isValidValue: function (value) {\n return this.context.formsy.isValidValue.call(null, this, value);\n //return this.props._isValidValue.call(null, this, value);\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Mixin.js\n **/","module.exports = {\n arraysDiffer: function (a, b) {\n var isDifferent = false;\n if (a.length !== b.length) {\n isDifferent = true;\n } else {\n a.forEach(function (item, index) {\n if (!this.isSame(item, b[index])) {\n isDifferent = true;\n }\n }, this);\n }\n return isDifferent;\n },\n\n objectsDiffer: function (a, b) {\n var isDifferent = false;\n if (Object.keys(a).length !== Object.keys(b).length) {\n isDifferent = true;\n } else {\n Object.keys(a).forEach(function (key) {\n if (!this.isSame(a[key], b[key])) {\n isDifferent = true;\n }\n }, this);\n }\n return isDifferent;\n },\n\n isSame: function (a, b) {\n if (typeof a !== typeof b) {\n return false;\n } else if (Array.isArray(a)) {\n return !this.arraysDiffer(a, b);\n } else if (typeof a === 'object' && a !== null && b !== null) {\n return !this.objectsDiffer(a, b);\n }\n\n return a === b;\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils.js\n **/","var React = global.React || require('react');\nvar Mixin = require('./Mixin.js');\nmodule.exports = function () {\n return function (Component) {\n return React.createClass({\n mixins: [Mixin],\n render: function () {\n return React.createElement(Component, {\n setValidations: this.setValidations,\n setValue: this.setValue,\n resetValue: this.resetValue,\n getValue: this.getValue,\n hasValue: this.hasValue,\n getErrorMessage: this.getErrorMessage,\n getErrorMessages: this.getErrorMessages,\n isFormDisabled: this.isFormDisabled,\n isValid: this.isValid,\n isPristine: this.isPristine,\n isFormSubmitted: this.isFormSubmitted,\n isRequired: this.isRequired,\n showRequired: this.showRequired,\n showError: this.showError,\n isValidValue: this.isValidValue,\n ...this.props\n });\n }\n });\n };\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Decorator.js\n **/","var React = global.React || require('react');\nvar Mixin = require('./Mixin.js');\nmodule.exports = function (Component) {\n return React.createClass({\n mixins: [Mixin],\n render: function () {\n return React.createElement(Component, {\n setValidations: this.setValidations,\n setValue: this.setValue,\n resetValue: this.resetValue,\n getValue: this.getValue,\n hasValue: this.hasValue,\n getErrorMessage: this.getErrorMessage,\n getErrorMessages: this.getErrorMessages,\n isFormDisabled: this.isFormDisabled,\n isValid: this.isValid,\n isPristine: this.isPristine,\n isFormSubmitted: this.isFormSubmitted,\n isRequired: this.isRequired,\n showRequired: this.showRequired,\n showError: this.showError,\n isValidValue: this.isValidValue\n });\n }\n });\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/HOC.js\n **/","var isExisty = function (value) {\n return value !== null && value !== undefined;\n};\n\nvar isEmpty = function (value) {\n return value === '';\n};\n\nvar validations = {\n isDefaultRequiredValue: function (values, value) {\n return value === undefined || value === '';\n },\n isExisty: function (values, value) {\n return isExisty(value);\n },\n matchRegexp: function (values, value, regexp) {\n return !isExisty(value) || isEmpty(value) || regexp.test(value);\n },\n isUndefined: function (values, value) {\n return value === undefined;\n },\n isEmptyString: function (values, value) {\n return isEmpty(value);\n },\n isEmail: function (values, value) {\n return validations.matchRegexp(values, value, /^((([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);\n },\n isUrl: function (values, value) {\n return validations.matchRegexp(values, value, /^(https?|s?ftp):\\/\\/(((([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);\n },\n isTrue: function (values, value) {\n return value === true;\n },\n isFalse: function (values, value) {\n return value === false;\n },\n isNumeric: function (values, value) {\n if (typeof value === 'number') {\n return true;\n }\n return validations.matchRegexp(values, value, /^[-+]?(?:\\d*[.])?\\d+$/);\n },\n isAlpha: function (values, value) {\n return validations.matchRegexp(values, value, /^[A-Z]+$/i);\n },\n isAlphanumeric: function (values, value) {\n return validations.matchRegexp(values, value, /^[0-9A-Z]+$/i);\n },\n isInt: function (values, value) {\n return validations.matchRegexp(values, value, /^(?:[-+]?(?:0|[1-9]\\d*))$/);\n },\n isFloat: function (values, value) {\n return validations.matchRegexp(values, value, /^(?:[-+]?(?:\\d+))?(?:\\.\\d*)?(?:[eE][\\+\\-]?(?:\\d+))?$/);\n },\n isWords: function (values, value) {\n return validations.matchRegexp(values, value, /^[A-Z\\s]+$/i);\n },\n isSpecialWords: function (values, value) {\n return validations.matchRegexp(values, value, /^[A-Z\\s\\u00C0-\\u017F]+$/i);\n },\n isLength: function (values, value, length) {\n return !isExisty(value) || isEmpty(value) || value.length === length;\n },\n equals: function (values, value, eql) {\n return !isExisty(value) || isEmpty(value) || value == eql;\n },\n equalsField: function (values, value, field) {\n return value == values[field];\n },\n maxLength: function (values, value, length) {\n return !isExisty(value) || value.length <= length;\n },\n minLength: function (values, value, length) {\n return !isExisty(value) || isEmpty(value) || value.length >= length;\n }\n};\n\nmodule.exports = validations;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/validationRules.js\n **/","module.exports = function (source) {\n\n\n // \"foo[0]\"\n return Object.keys(source).reduce(function (output, key) {\n\n var parentKey = key.match(/[^\\[]*/i);\n var paths = key.match(/\\[.*?\\]/g) || [];\n paths = [parentKey[0]].concat(paths).map(function (key) {\n return key.replace(/\\[|\\]/g, '');\n });\n\n var currentPath = output;\n while (paths.length) {\n\n var pathKey = paths.shift();\n\n if (pathKey in currentPath) {\n currentPath = currentPath[pathKey];\n } else {\n currentPath[pathKey] = paths.length ? isNaN(paths[0]) ? {} : [] : source[key];\n currentPath = currentPath[pathKey];\n }\n\n }\n\n return output;\n\n }, {});\n\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/form-data-to-object/index.js\n ** module id = 7\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///formsy-react.js","webpack:///webpack/bootstrap ccc7697172a5a3985000","webpack:///./src/main.js","webpack:///external \"react\"","webpack:///./src/Mixin.js","webpack:///./src/utils.js","webpack:///./src/Decorator.js","webpack:///./src/HOC.js","webpack:///./src/validationRules.js","webpack:///./~/form-data-to-object/index.js"],"names":["root","factory","exports","module","require","define","amd","this","__WEBPACK_EXTERNAL_MODULE_1__","modules","__webpack_require__","moduleId","installedModules","id","loaded","call","m","c","p","global","_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","React","Formsy","validationRules","formDataToObject","utils","Mixin","HOC","Decorator","options","defaults","passedOptions","addValidationRule","name","func","Form","createClass","displayName","getInitialState","isValid","isSubmitting","canChange","getDefaultProps","onSuccess","onError","onSubmit","onValidSubmit","onInvalidSubmit","onSubmitted","onValid","onInvalid","onChange","validationErrors","preventExternalInvalidation","childContextTypes","formsy","PropTypes","object","getChildContext","attachToForm","detachFromForm","validate","isFormDisabled","isValidValue","component","value","runValidation","bind","componentWillMount","inputs","model","componentDidMount","validateForm","componentWillUpdate","prevInputKeys","keys","componentDidUpdate","props","setInputValidationErrors","newInputKeys","arraysDiffer","reset","data","setFormPristine","resetModel","submit","event","preventDefault","updateModel","mapModel","updateInputsWithError","state","mapping","reduce","mappedModel","keyArray","split","base","currentKey","shift","forEach","_value","setValue","resetValue","errors","index","args","_isValid","_validationError","setState","apply","isChanged","isSame","getPristineValues","getCurrentValues","Error","JSON","stringify","_externalError","disabled","isPristine","inputKeys","_formSubmitted","_isPristine","validation","_isRequired","isRequired","error","currentValues","validationError","validationResults","runRules","_validations","requiredResults","_requiredValidations","failed","success","map","filter","x","pos","arr","indexOf","validations","results","validationMethod","push","allIsValid","onValidationComplete","every","isMounted","render","createElement","children","convertValidationsToObject","validateMethod","arg","parse","e","_pristineValue","contextTypes","configure","setValidations","required","context","componentWillReceiveProps","nextProps","prevProps","componentWillUnmount","isDefaultRequiredValue","getValue","hasValue","getErrorMessage","messages","getErrorMessages","showRequired","isFormSubmitted","showError","a","b","isDifferent","item","objectsDiffer","Array","isArray","Component","mixins","_isExisty","undefined","isEmpty","values","isExisty","matchRegexp","regexp","test","isUndefined","isEmptyString","isEmail","isUrl","isTrue","isFalse","isNumeric","isAlpha","isAlphanumeric","isInt","isFloat","isWords","isSpecialWords","isLength","equals","eql","equalsField","field","maxLength","minLength","output","parentKey","match","paths","concat","replace","currentPath","pathKey","isNaN"],"mappings":"CAAA,SAAAA,EAAAC,GACA,gBAAAC,UAAA,gBAAAC,QACAA,OAAAD,QAAAD,EAAAG,QAAA,UACA,kBAAAC,gBAAAC,IACAD,QAAA,SAAAJ,GACA,gBAAAC,SACAA,QAAA,OAAAD,EAAAG,QAAA,UAEAJ,EAAA,OAAAC,EAAAD,EAAA,QACCO,KAAA,SAAAC,GACD,MCAgB,UAAUC,GCN1B,QAAAC,GAAAC,GAGA,GAAAC,EAAAD,GACA,MAAAC,GAAAD,GAAAT,OAGA,IAAAC,GAAAS,EAAAD,IACAT,WACAW,GAAAF,EACAG,QAAA,EAUA,OANAL,GAAAE,GAAAI,KAAAZ,EAAAD,QAAAC,IAAAD,QAAAQ,GAGAP,EAAAW,QAAA,EAGAX,EAAAD,QAvBA,GAAAU,KAqCA,OATAF,GAAAM,EAAAP,EAGAC,EAAAO,EAAAL,EAGAF,EAAAQ,EAAA,GAGAR,EAAA,KDgBM,SAASP,EAAQD,EAASQ,IAEH,SAASS,GAAS,YAE9C,IAAIC,GAAWC,OAAOC,QAAU,SAAUC,GAAU,IAAK,GAAIC,GAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,GAAIG,GAASF,UAAUD,EAAI,KAAK,GAAII,KAAOD,GAAcN,OAAOQ,UAAUC,eAAef,KAAKY,EAAQC,KAAQL,EAAOK,GAAOD,EAAOC,IAAY,MAAOL,IE1DpPQ,EAAQZ,EAAOY,OAASrB,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IAAAF,EAAA,IAAAG,OAAAD,GAAAjF,IAAA,SAAAvH,GACA,MAAAA,GAAA0M,QAAA,cAIA,KADA,GAAAC,GAAAN,EACAG,EAAA1M,QAAA,CAEA,GAAA8M,GAAAJ,EAAAvH,OAEA2H,KAAAD,GACAA,IAAAC,IAEAD,EAAAC,GAAAJ,EAAA1M,OAAA+M,MAAAL,EAAA,UAAkEzM,EAAAC,GAClE2M,IAAAC,IAKA,MAAAP","file":"formsy-react.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Formsy\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"Formsy\"] = factory(root[\"react\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn \n\n\n/** WEBPACK FOOTER **\n ** webpack/universalModuleDefinition\n **/","(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory(require(\"react\"));\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([\"react\"], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Formsy\"] = factory(require(\"react\"));\n\telse\n\t\troot[\"Formsy\"] = factory(root[\"react\"]);\n})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId])\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\texports: {},\n/******/ \t\t\tid: moduleId,\n/******/ \t\t\tloaded: false\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.loaded = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(0);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar _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\t\n\tvar React = global.React || __webpack_require__(1);\n\tvar Formsy = {};\n\tvar validationRules = __webpack_require__(6);\n\tvar formDataToObject = __webpack_require__(7);\n\tvar utils = __webpack_require__(3);\n\tvar Mixin = __webpack_require__(2);\n\tvar HOC = __webpack_require__(5);\n\tvar Decorator = __webpack_require__(4);\n\tvar options = {};\n\t\n\tFormsy.Mixin = Mixin;\n\tFormsy.HOC = HOC;\n\tFormsy.Decorator = Decorator;\n\t\n\tFormsy.defaults = function (passedOptions) {\n\t options = passedOptions;\n\t};\n\t\n\tFormsy.addValidationRule = function (name, func) {\n\t validationRules[name] = func;\n\t};\n\t\n\tFormsy.Form = React.createClass({\n\t displayName: 'Formsy',\n\t getInitialState: function getInitialState() {\n\t return {\n\t isValid: true,\n\t isSubmitting: false,\n\t canChange: false\n\t };\n\t },\n\t getDefaultProps: function getDefaultProps() {\n\t return {\n\t onSuccess: function onSuccess() {},\n\t onError: function onError() {},\n\t onSubmit: function onSubmit() {},\n\t onValidSubmit: function onValidSubmit() {},\n\t onInvalidSubmit: function onInvalidSubmit() {},\n\t onSubmitted: function onSubmitted() {},\n\t onValid: function onValid() {},\n\t onInvalid: function onInvalid() {},\n\t onChange: function onChange() {},\n\t validationErrors: null,\n\t preventExternalInvalidation: false\n\t };\n\t },\n\t\n\t childContextTypes: {\n\t formsy: React.PropTypes.object\n\t },\n\t getChildContext: function getChildContext() {\n\t return {\n\t formsy: {\n\t attachToForm: this.attachToForm,\n\t detachFromForm: this.detachFromForm,\n\t validate: this.validate,\n\t isFormDisabled: this.isFormDisabled,\n\t isValidValue: (function (component, value) {\n\t return this.runValidation(component, value).isValid;\n\t }).bind(this)\n\t }\n\t };\n\t },\n\t\n\t // Add a map to store the inputs of the form, a model to store\n\t // the values of the form and register child inputs\n\t componentWillMount: function componentWillMount() {\n\t this.inputs = {};\n\t this.model = {};\n\t },\n\t\n\t componentDidMount: function componentDidMount() {\n\t this.validateForm();\n\t },\n\t\n\t componentWillUpdate: function componentWillUpdate() {\n\t\n\t // Keep a reference to input keys before form updates,\n\t // to check if inputs has changed after render\n\t this.prevInputKeys = Object.keys(this.inputs);\n\t },\n\t\n\t componentDidUpdate: function componentDidUpdate() {\n\t\n\t if (this.props.validationErrors) {\n\t this.setInputValidationErrors(this.props.validationErrors);\n\t }\n\t\n\t var newInputKeys = Object.keys(this.inputs);\n\t if (utils.arraysDiffer(this.prevInputKeys, newInputKeys)) {\n\t this.validateForm();\n\t }\n\t },\n\t\n\t // Allow resetting to specified data\n\t reset: function reset(data) {\n\t this.setFormPristine(true);\n\t this.resetModel(data);\n\t },\n\t\n\t // Update model, submit to url prop and send the model\n\t submit: function submit(event) {\n\t\n\t event && event.preventDefault();\n\t\n\t // Trigger form as not pristine.\n\t // If any inputs have not been touched yet this will make them dirty\n\t // so validation becomes visible (if based on isPristine)\n\t this.setFormPristine(false);\n\t this.updateModel();\n\t var model = this.mapModel();\n\t this.props.onSubmit(model, this.resetModel, this.updateInputsWithError);\n\t this.state.isValid ? this.props.onValidSubmit(model, this.resetModel, this.updateInputsWithError) : this.props.onInvalidSubmit(model, this.resetModel, this.updateInputsWithError);\n\t },\n\t\n\t mapModel: function mapModel() {\n\t if (this.props.mapping) {\n\t return this.props.mapping(this.model);\n\t } else {\n\t return formDataToObject(Object.keys(this.model).reduce((function (mappedModel, key) {\n\t\n\t var keyArray = key.split('.');\n\t var base = mappedModel;\n\t while (keyArray.length) {\n\t var currentKey = keyArray.shift();\n\t base = base[currentKey] = keyArray.length ? base[currentKey] || {} : this.model[key];\n\t }\n\t\n\t return mappedModel;\n\t }).bind(this), {}));\n\t }\n\t },\n\t\n\t // Goes through all registered components and\n\t // updates the model values\n\t updateModel: function updateModel() {\n\t Object.keys(this.inputs).forEach((function (name) {\n\t var component = this.inputs[name];\n\t this.model[name] = component.state._value;\n\t }).bind(this));\n\t },\n\t\n\t // Reset each key in the model to the original / initial / specified value\n\t resetModel: function resetModel(data) {\n\t Object.keys(this.inputs).forEach((function (name) {\n\t if (data && data[name]) {\n\t this.inputs[name].setValue(data[name]);\n\t } else {\n\t this.inputs[name].resetValue();\n\t }\n\t }).bind(this));\n\t this.validateForm();\n\t },\n\t\n\t setInputValidationErrors: function setInputValidationErrors(errors) {\n\t Object.keys(this.inputs).forEach((function (name, index) {\n\t var component = this.inputs[name];\n\t var args = [{\n\t _isValid: !(name in errors),\n\t _validationError: typeof errors[name] === 'string' ? [errors[name]] : errors[name]\n\t }];\n\t component.setState.apply(component, args);\n\t }).bind(this));\n\t },\n\t\n\t // Checks if the values have changed from their initial value\n\t isChanged: function isChanged() {\n\t return !utils.isSame(this.getPristineValues(), this.getCurrentValues());\n\t },\n\t\n\t getPristineValues: function getPristineValues() {\n\t var inputs = this.inputs;\n\t return Object.keys(inputs).reduce(function (data, name) {\n\t var component = inputs[name];\n\t data[name] = component.props.value;\n\t return data;\n\t }, {});\n\t },\n\t\n\t // Go through errors from server and grab the components\n\t // stored in the inputs map. Change their state to invalid\n\t // and set the serverError message\n\t updateInputsWithError: function updateInputsWithError(errors) {\n\t Object.keys(errors).forEach((function (name, index) {\n\t var component = this.inputs[name];\n\t\n\t if (!component) {\n\t throw new Error('You are trying to update an input that does not exist. Verify errors object with input names. ' + JSON.stringify(errors));\n\t }\n\t var args = [{\n\t _isValid: this.props.preventExternalInvalidation || false,\n\t _externalError: typeof errors[name] === 'string' ? [errors[name]] : errors[name]\n\t }];\n\t component.setState.apply(component, args);\n\t }).bind(this));\n\t },\n\t\n\t isFormDisabled: function isFormDisabled() {\n\t return this.props.disabled;\n\t },\n\t\n\t getCurrentValues: function getCurrentValues() {\n\t return Object.keys(this.inputs).reduce((function (data, name) {\n\t var component = this.inputs[name];\n\t data[name] = component.state._value;\n\t return data;\n\t }).bind(this), {});\n\t },\n\t\n\t setFormPristine: function setFormPristine(isPristine) {\n\t var inputs = this.inputs;\n\t var inputKeys = Object.keys(inputs);\n\t\n\t this.setState({\n\t _formSubmitted: !isPristine\n\t });\n\t\n\t // Iterate through each component and set it as pristine\n\t // or \"dirty\".\n\t inputKeys.forEach((function (name, index) {\n\t var component = inputs[name];\n\t component.setState({\n\t _formSubmitted: !isPristine,\n\t _isPristine: isPristine\n\t });\n\t }).bind(this));\n\t },\n\t\n\t // Use the binded values and the actual input value to\n\t // validate the input and set its state. Then check the\n\t // state of the form itself\n\t validate: function validate(component) {\n\t\n\t // Trigger onChange\n\t if (this.state.canChange) {\n\t this.props.onChange(this.getCurrentValues(), this.isChanged());\n\t }\n\t\n\t var validation = this.runValidation(component);\n\t // Run through the validations, split them up and call\n\t // the validator IF there is a value or it is required\n\t component.setState({\n\t _isValid: validation.isValid,\n\t _isRequired: validation.isRequired,\n\t _validationError: validation.error,\n\t _externalError: null\n\t }, this.validateForm);\n\t },\n\t\n\t // Checks validation on current value or a passed value\n\t runValidation: function runValidation(component, value) {\n\t\n\t var currentValues = this.getCurrentValues();\n\t var validationErrors = component.props.validationErrors;\n\t var validationError = component.props.validationError;\n\t value = arguments.length === 2 ? value : component.state._value;\n\t\n\t var validationResults = this.runRules(value, currentValues, component._validations);\n\t var requiredResults = this.runRules(value, currentValues, component._requiredValidations);\n\t\n\t // the component defines an explicit validate function\n\t if (typeof component.validate === \"function\") {\n\t validationResults.failed = component.validate() ? [] : ['failed'];\n\t }\n\t\n\t var isRequired = Object.keys(component._requiredValidations).length ? !!requiredResults.success.length : false;\n\t var isValid = !validationResults.failed.length && !(this.props.validationErrors && this.props.validationErrors[component.props.name]);\n\t\n\t return {\n\t isRequired: isRequired,\n\t isValid: isRequired ? false : isValid,\n\t error: (function () {\n\t\n\t if (isValid && !isRequired) {\n\t return [];\n\t }\n\t\n\t if (validationResults.errors.length) {\n\t return validationResults.errors;\n\t }\n\t\n\t if (this.props.validationErrors && this.props.validationErrors[component.props.name]) {\n\t return typeof this.props.validationErrors[component.props.name] === 'string' ? [this.props.validationErrors[component.props.name]] : this.props.validationErrors[component.props.name];\n\t }\n\t\n\t if (isRequired) {\n\t var error = validationErrors[requiredResults.success[0]];\n\t return error ? [error] : null;\n\t }\n\t\n\t if (validationResults.failed.length) {\n\t return validationResults.failed.map(function (failed) {\n\t return validationErrors[failed] ? validationErrors[failed] : validationError;\n\t }).filter(function (x, pos, arr) {\n\t // Remove duplicates\n\t return arr.indexOf(x) === pos;\n\t });\n\t }\n\t }).call(this)\n\t };\n\t },\n\t\n\t runRules: function runRules(value, currentValues, validations) {\n\t\n\t var results = {\n\t errors: [],\n\t failed: [],\n\t success: []\n\t };\n\t if (Object.keys(validations).length) {\n\t Object.keys(validations).forEach(function (validationMethod) {\n\t\n\t if (validationRules[validationMethod] && typeof validations[validationMethod] === 'function') {\n\t throw new Error('Formsy does not allow you to override default validations: ' + validationMethod);\n\t }\n\t\n\t if (!validationRules[validationMethod] && typeof validations[validationMethod] !== 'function') {\n\t throw new Error('Formsy does not have the validation rule: ' + validationMethod);\n\t }\n\t\n\t if (typeof validations[validationMethod] === 'function') {\n\t var validation = validations[validationMethod](currentValues, value);\n\t if (typeof validation === 'string') {\n\t results.errors.push(validation);\n\t results.failed.push(validationMethod);\n\t } else if (!validation) {\n\t results.failed.push(validationMethod);\n\t }\n\t return;\n\t } else if (typeof validations[validationMethod] !== 'function') {\n\t var validation = validationRules[validationMethod](currentValues, value, validations[validationMethod]);\n\t if (typeof validation === 'string') {\n\t results.errors.push(validation);\n\t results.failed.push(validationMethod);\n\t } else if (!validation) {\n\t results.failed.push(validationMethod);\n\t } else {\n\t results.success.push(validationMethod);\n\t }\n\t return;\n\t }\n\t\n\t return results.success.push(validationMethod);\n\t });\n\t }\n\t\n\t return results;\n\t },\n\t\n\t // Validate the form by going through all child input components\n\t // and check their state\n\t validateForm: function validateForm() {\n\t var allIsValid;\n\t var inputs = this.inputs;\n\t var inputKeys = Object.keys(inputs);\n\t\n\t // We need a callback as we are validating all inputs again. This will\n\t // run when the last component has set its state\n\t var onValidationComplete = (function () {\n\t allIsValid = inputKeys.every((function (name) {\n\t return inputs[name].state._isValid;\n\t }).bind(this));\n\t\n\t this.setState({\n\t isValid: allIsValid\n\t });\n\t\n\t if (allIsValid) {\n\t this.props.onValid();\n\t } else {\n\t this.props.onInvalid();\n\t }\n\t\n\t // Tell the form that it can start to trigger change events\n\t this.setState({\n\t canChange: true\n\t });\n\t }).bind(this);\n\t\n\t // Run validation again in case affected by other inputs. The\n\t // last component validated will run the onValidationComplete callback\n\t inputKeys.forEach((function (name, index) {\n\t var component = inputs[name];\n\t var validation = this.runValidation(component);\n\t if (validation.isValid && component.state._externalError) {\n\t validation.isValid = false;\n\t }\n\t component.setState({\n\t _isValid: validation.isValid,\n\t _isRequired: validation.isRequired,\n\t _validationError: validation.error,\n\t _externalError: !validation.isValid && component.state._externalError ? component.state._externalError : null\n\t }, index === inputKeys.length - 1 ? onValidationComplete : null);\n\t }).bind(this));\n\t\n\t // If there are no inputs, set state where form is ready to trigger\n\t // change event. New inputs might be added later\n\t if (!inputKeys.length && this.isMounted()) {\n\t this.setState({\n\t canChange: true\n\t });\n\t }\n\t },\n\t\n\t // Method put on each input component to register\n\t // itself to the form\n\t attachToForm: function attachToForm(component) {\n\t this.inputs[component.props.name] = component;\n\t this.model[component.props.name] = component.state._value;\n\t this.validate(component);\n\t },\n\t\n\t // Method put on each input component to unregister\n\t // itself from the form\n\t detachFromForm: function detachFromForm(component) {\n\t delete this.inputs[component.props.name];\n\t delete this.model[component.props.name];\n\t this.validateForm();\n\t },\n\t render: function render() {\n\t\n\t return React.createElement(\n\t 'form',\n\t _extends({}, this.props, { onSubmit: this.submit }),\n\t this.props.children\n\t );\n\t }\n\t});\n\t\n\tif (!global.exports && !global.module && (!global.define || !global.define.amd)) {\n\t global.Formsy = Formsy;\n\t}\n\t\n\tmodule.exports = Formsy;\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 1 */\n/***/ function(module, exports) {\n\n\tmodule.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n/***/ },\n/* 2 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar utils = __webpack_require__(3);\n\tvar React = global.React || __webpack_require__(1);\n\t\n\tvar convertValidationsToObject = function convertValidationsToObject(validations) {\n\t\n\t if (typeof validations === 'string') {\n\t\n\t return validations.split(/\\,(?![^{\\[]*[}\\]])/g).reduce(function (validations, validation) {\n\t var args = validation.split(':');\n\t var validateMethod = args.shift();\n\t\n\t args = args.map(function (arg) {\n\t try {\n\t return JSON.parse(arg);\n\t } catch (e) {\n\t return arg; // It is a string if it can not parse it\n\t }\n\t });\n\t\n\t if (args.length > 1) {\n\t throw new Error('Formsy does not support multiple args on string validations. Use object format of validations instead.');\n\t }\n\t\n\t validations[validateMethod] = args.length ? args[0] : true;\n\t return validations;\n\t }, {});\n\t }\n\t\n\t return validations || {};\n\t};\n\t\n\tmodule.exports = {\n\t getInitialState: function getInitialState() {\n\t return {\n\t _value: this.props.value,\n\t _isRequired: false,\n\t _isValid: true,\n\t _isPristine: true,\n\t _pristineValue: this.props.value,\n\t _validationError: [],\n\t _externalError: null,\n\t _formSubmitted: false\n\t };\n\t },\n\t contextTypes: {\n\t formsy: React.PropTypes.object // What about required?\n\t },\n\t getDefaultProps: function getDefaultProps() {\n\t return {\n\t validationError: '',\n\t validationErrors: {}\n\t };\n\t },\n\t\n\t componentWillMount: function componentWillMount() {\n\t var configure = (function () {\n\t this.setValidations(this.props.validations, this.props.required);\n\t\n\t // Pass a function instead?\n\t this.context.formsy.attachToForm(this);\n\t //this.props._attachToForm(this);\n\t }).bind(this);\n\t\n\t if (!this.props.name) {\n\t throw new Error('Form Input requires a name property when used');\n\t }\n\t\n\t /*\n\t if (!this.props._attachToForm) {\n\t return setTimeout(function () {\n\t if (!this.isMounted()) return;\n\t if (!this.props._attachToForm) {\n\t throw new Error('Form Mixin requires component to be nested in a Form');\n\t }\n\t configure();\n\t }.bind(this), 0);\n\t }\n\t */\n\t configure();\n\t },\n\t\n\t // We have to make the validate method is kept when new props are added\n\t componentWillReceiveProps: function componentWillReceiveProps(nextProps) {\n\t this.setValidations(nextProps.validations, nextProps.required);\n\t },\n\t\n\t componentDidUpdate: function componentDidUpdate(prevProps) {\n\t\n\t // If the value passed has changed, set it. If value is not passed it will\n\t // internally update, and this will never run\n\t if (!utils.isSame(this.props.value, prevProps.value)) {\n\t this.setValue(this.props.value);\n\t }\n\t\n\t // If validations or required is changed, run a new validation\n\t if (!utils.isSame(this.props.validations, prevProps.validations) || !utils.isSame(this.props.required, prevProps.required)) {\n\t this.context.formsy.validate(this);\n\t }\n\t },\n\t\n\t // Detach it when component unmounts\n\t componentWillUnmount: function componentWillUnmount() {\n\t this.context.formsy.detachFromForm(this);\n\t //this.props._detachFromForm(this);\n\t },\n\t\n\t setValidations: function setValidations(validations, required) {\n\t\n\t // Add validations to the store itself as the props object can not be modified\n\t this._validations = convertValidationsToObject(validations) || {};\n\t this._requiredValidations = required === true ? { isDefaultRequiredValue: true } : convertValidationsToObject(required);\n\t },\n\t\n\t // We validate after the value has been set\n\t setValue: function setValue(value) {\n\t this.setState({\n\t _value: value,\n\t _isPristine: false\n\t }, (function () {\n\t this.context.formsy.validate(this);\n\t //this.props._validate(this);\n\t }).bind(this));\n\t },\n\t resetValue: function resetValue() {\n\t this.setState({\n\t _value: this.state._pristineValue,\n\t _isPristine: true\n\t }, function () {\n\t this.context.formsy.validate(this);\n\t //this.props._validate(this);\n\t });\n\t },\n\t getValue: function getValue() {\n\t return this.state._value;\n\t },\n\t hasValue: function hasValue() {\n\t return this.state._value !== '';\n\t },\n\t getErrorMessage: function getErrorMessage() {\n\t var messages = this.getErrorMessages();\n\t return messages.length ? messages[0] : null;\n\t },\n\t getErrorMessages: function getErrorMessages() {\n\t return !this.isValid() || this.showRequired() ? this.state._externalError || this.state._validationError || [] : [];\n\t },\n\t isFormDisabled: function isFormDisabled() {\n\t return this.context.formsy.isFormDisabled();\n\t //return this.props._isFormDisabled();\n\t },\n\t isValid: function isValid() {\n\t return this.state._isValid;\n\t },\n\t isPristine: function isPristine() {\n\t return this.state._isPristine;\n\t },\n\t isFormSubmitted: function isFormSubmitted() {\n\t return this.state._formSubmitted;\n\t },\n\t isRequired: function isRequired() {\n\t return !!this.props.required;\n\t },\n\t showRequired: function showRequired() {\n\t return this.state._isRequired;\n\t },\n\t showError: function showError() {\n\t return !this.showRequired() && !this.isValid();\n\t },\n\t isValidValue: function isValidValue(value) {\n\t return this.context.formsy.isValidValue.call(null, this, value);\n\t //return this.props._isValidValue.call(null, this, value);\n\t }\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 3 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tmodule.exports = {\n\t arraysDiffer: function arraysDiffer(a, b) {\n\t var isDifferent = false;\n\t if (a.length !== b.length) {\n\t isDifferent = true;\n\t } else {\n\t a.forEach(function (item, index) {\n\t if (!this.isSame(item, b[index])) {\n\t isDifferent = true;\n\t }\n\t }, this);\n\t }\n\t return isDifferent;\n\t },\n\t\n\t objectsDiffer: function objectsDiffer(a, b) {\n\t var isDifferent = false;\n\t if (Object.keys(a).length !== Object.keys(b).length) {\n\t isDifferent = true;\n\t } else {\n\t Object.keys(a).forEach(function (key) {\n\t if (!this.isSame(a[key], b[key])) {\n\t isDifferent = true;\n\t }\n\t }, this);\n\t }\n\t return isDifferent;\n\t },\n\t\n\t isSame: function isSame(a, b) {\n\t if (typeof a !== typeof b) {\n\t return false;\n\t } else if (Array.isArray(a)) {\n\t return !this.arraysDiffer(a, b);\n\t } else if (typeof a === 'object' && a !== null && b !== null) {\n\t return !this.objectsDiffer(a, b);\n\t }\n\t\n\t return a === b;\n\t }\n\t};\n\n/***/ },\n/* 4 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar _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\t\n\tvar React = global.React || __webpack_require__(1);\n\tvar Mixin = __webpack_require__(2);\n\tmodule.exports = function () {\n\t return function (Component) {\n\t return React.createClass({\n\t mixins: [Mixin],\n\t render: function render() {\n\t return React.createElement(Component, _extends({\n\t setValidations: this.setValidations,\n\t setValue: this.setValue,\n\t resetValue: this.resetValue,\n\t getValue: this.getValue,\n\t hasValue: this.hasValue,\n\t getErrorMessage: this.getErrorMessage,\n\t getErrorMessages: this.getErrorMessages,\n\t isFormDisabled: this.isFormDisabled,\n\t isValid: this.isValid,\n\t isPristine: this.isPristine,\n\t isFormSubmitted: this.isFormSubmitted,\n\t isRequired: this.isRequired,\n\t showRequired: this.showRequired,\n\t showError: this.showError,\n\t isValidValue: this.isValidValue\n\t }, this.props));\n\t }\n\t });\n\t };\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 5 */\n/***/ function(module, exports, __webpack_require__) {\n\n\t/* WEBPACK VAR INJECTION */(function(global) {'use strict';\n\t\n\tvar _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\t\n\tvar React = global.React || __webpack_require__(1);\n\tvar Mixin = __webpack_require__(2);\n\tmodule.exports = function (Component) {\n\t return React.createClass({\n\t mixins: [Mixin],\n\t render: function render() {\n\t return React.createElement(Component, _extends({\n\t setValidations: this.setValidations,\n\t setValue: this.setValue,\n\t resetValue: this.resetValue,\n\t getValue: this.getValue,\n\t hasValue: this.hasValue,\n\t getErrorMessage: this.getErrorMessage,\n\t getErrorMessages: this.getErrorMessages,\n\t isFormDisabled: this.isFormDisabled,\n\t isValid: this.isValid,\n\t isPristine: this.isPristine,\n\t isFormSubmitted: this.isFormSubmitted,\n\t isRequired: this.isRequired,\n\t showRequired: this.showRequired,\n\t showError: this.showError,\n\t isValidValue: this.isValidValue\n\t }, this.props));\n\t }\n\t });\n\t};\n\t/* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))\n\n/***/ },\n/* 6 */\n/***/ function(module, exports) {\n\n\t'use strict';\n\t\n\tvar _isExisty = function _isExisty(value) {\n\t return value !== null && value !== undefined;\n\t};\n\t\n\tvar isEmpty = function isEmpty(value) {\n\t return value === '';\n\t};\n\t\n\tvar validations = {\n\t isDefaultRequiredValue: function isDefaultRequiredValue(values, value) {\n\t return value === undefined || value === '';\n\t },\n\t isExisty: function isExisty(values, value) {\n\t return _isExisty(value);\n\t },\n\t matchRegexp: function matchRegexp(values, value, regexp) {\n\t return !_isExisty(value) || isEmpty(value) || regexp.test(value);\n\t },\n\t isUndefined: function isUndefined(values, value) {\n\t return value === undefined;\n\t },\n\t isEmptyString: function isEmptyString(values, value) {\n\t return isEmpty(value);\n\t },\n\t isEmail: function isEmail(values, value) {\n\t return validations.matchRegexp(values, value, /^((([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);\n\t },\n\t isUrl: function isUrl(values, value) {\n\t return validations.matchRegexp(values, value, /^(https?|s?ftp):\\/\\/(((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\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|[\\uE000-\\uF8FF]|\\/|\\?)*)?(#((([a-z]|\\d|-|\\.|_|~|[\\u00A0-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF])|(%[\\da-f]{2})|[!\\$&'\\(\\)\\*\\+,;=]|:|@)|\\/|\\?)*)?$/i);\n\t },\n\t isTrue: function isTrue(values, value) {\n\t return value === true;\n\t },\n\t isFalse: function isFalse(values, value) {\n\t return value === false;\n\t },\n\t isNumeric: function isNumeric(values, value) {\n\t if (typeof value === 'number') {\n\t return true;\n\t }\n\t return validations.matchRegexp(values, value, /^[-+]?(?:\\d*[.])?\\d+$/);\n\t },\n\t isAlpha: function isAlpha(values, value) {\n\t return validations.matchRegexp(values, value, /^[A-Z]+$/i);\n\t },\n\t isAlphanumeric: function isAlphanumeric(values, value) {\n\t return validations.matchRegexp(values, value, /^[0-9A-Z]+$/i);\n\t },\n\t isInt: function isInt(values, value) {\n\t return validations.matchRegexp(values, value, /^(?:[-+]?(?:0|[1-9]\\d*))$/);\n\t },\n\t isFloat: function isFloat(values, value) {\n\t return validations.matchRegexp(values, value, /^(?:[-+]?(?:\\d+))?(?:\\.\\d*)?(?:[eE][\\+\\-]?(?:\\d+))?$/);\n\t },\n\t isWords: function isWords(values, value) {\n\t return validations.matchRegexp(values, value, /^[A-Z\\s]+$/i);\n\t },\n\t isSpecialWords: function isSpecialWords(values, value) {\n\t return validations.matchRegexp(values, value, /^[A-Z\\s\\u00C0-\\u017F]+$/i);\n\t },\n\t isLength: function isLength(values, value, length) {\n\t return !_isExisty(value) || isEmpty(value) || value.length === length;\n\t },\n\t equals: function equals(values, value, eql) {\n\t return !_isExisty(value) || isEmpty(value) || value == eql;\n\t },\n\t equalsField: function equalsField(values, value, field) {\n\t return value == values[field];\n\t },\n\t maxLength: function maxLength(values, value, length) {\n\t return !_isExisty(value) || value.length <= length;\n\t },\n\t minLength: function minLength(values, value, length) {\n\t return !_isExisty(value) || isEmpty(value) || value.length >= length;\n\t }\n\t};\n\t\n\tmodule.exports = validations;\n\n/***/ },\n/* 7 */\n/***/ function(module, exports) {\n\n\tmodule.exports = function (source) {\n\t\n\t\n\t // \"foo[0]\"\n\t return Object.keys(source).reduce(function (output, key) {\n\t\n\t var parentKey = key.match(/[^\\[]*/i);\n\t var paths = key.match(/\\[.*?\\]/g) || [];\n\t paths = [parentKey[0]].concat(paths).map(function (key) {\n\t return key.replace(/\\[|\\]/g, '');\n\t });\n\t\n\t var currentPath = output;\n\t while (paths.length) {\n\t\n\t var pathKey = paths.shift();\n\t\n\t if (pathKey in currentPath) {\n\t currentPath = currentPath[pathKey];\n\t } else {\n\t currentPath[pathKey] = paths.length ? isNaN(paths[0]) ? {} : [] : source[key];\n\t currentPath = currentPath[pathKey];\n\t }\n\t\n\t }\n\t\n\t return output;\n\t\n\t }, {});\n\t\n\t};\n\n\n/***/ }\n/******/ ])\n});\n;\n\n\n/** WEBPACK FOOTER **\n ** formsy-react.js\n **/"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId])\n \t\t\treturn installedModules[moduleId].exports;\n\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\texports: {},\n \t\t\tid: moduleId,\n \t\t\tloaded: false\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.loaded = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(0);\n\n\n\n/** WEBPACK FOOTER **\n ** webpack/bootstrap ccc7697172a5a3985000\n **/","var React = global.React || require('react');\nvar Formsy = {};\nvar validationRules = require('./validationRules.js');\nvar formDataToObject = require('form-data-to-object');\nvar utils = require('./utils.js');\nvar Mixin = require('./Mixin.js');\nvar HOC = require('./HOC.js');\nvar Decorator = require('./Decorator.js');\nvar options = {};\n\nFormsy.Mixin = Mixin;\nFormsy.HOC = HOC;\nFormsy.Decorator = Decorator;\n\nFormsy.defaults = function (passedOptions) {\n options = passedOptions;\n};\n\nFormsy.addValidationRule = function (name, func) {\n validationRules[name] = func;\n};\n\nFormsy.Form = React.createClass({\n displayName: 'Formsy',\n getInitialState: function () {\n return {\n isValid: true,\n isSubmitting: false,\n canChange: false\n };\n },\n getDefaultProps: function () {\n return {\n onSuccess: function () {},\n onError: function () {},\n onSubmit: function () {},\n onValidSubmit: function () {},\n onInvalidSubmit: function () {},\n onSubmitted: function () {},\n onValid: function () {},\n onInvalid: function () {},\n onChange: function () {},\n validationErrors: null,\n preventExternalInvalidation: false\n };\n },\n\n childContextTypes: {\n formsy: React.PropTypes.object\n },\n getChildContext: function () {\n return {\n formsy: {\n attachToForm: this.attachToForm,\n detachFromForm: this.detachFromForm,\n validate: this.validate,\n isFormDisabled: this.isFormDisabled,\n isValidValue: function (component, value) {\n return this.runValidation(component, value).isValid;\n }.bind(this)\n }\n }\n },\n\n // Add a map to store the inputs of the form, a model to store\n // the values of the form and register child inputs\n componentWillMount: function () {\n this.inputs = {};\n this.model = {};\n },\n\n componentDidMount: function () {\n this.validateForm();\n },\n\n componentWillUpdate: function () {\n\n // Keep a reference to input keys before form updates,\n // to check if inputs has changed after render\n this.prevInputKeys = Object.keys(this.inputs);\n\n },\n\n componentDidUpdate: function () {\n\n if (this.props.validationErrors) {\n this.setInputValidationErrors(this.props.validationErrors);\n }\n\n var newInputKeys = Object.keys(this.inputs);\n if (utils.arraysDiffer(this.prevInputKeys, newInputKeys)) {\n this.validateForm();\n }\n\n },\n\n // Allow resetting to specified data\n reset: function (data) {\n this.setFormPristine(true);\n this.resetModel(data);\n },\n\n // Update model, submit to url prop and send the model\n submit: function (event) {\n\n event && event.preventDefault();\n\n // Trigger form as not pristine.\n // If any inputs have not been touched yet this will make them dirty\n // so validation becomes visible (if based on isPristine)\n this.setFormPristine(false);\n this.updateModel();\n var model = this.mapModel();\n this.props.onSubmit(model, this.resetModel, this.updateInputsWithError);\n this.state.isValid ? this.props.onValidSubmit(model, this.resetModel, this.updateInputsWithError) : this.props.onInvalidSubmit(model, this.resetModel, this.updateInputsWithError);\n\n },\n\n mapModel: function () {\n if (this.props.mapping) {\n return this.props.mapping(this.model)\n } else {\n return formDataToObject(Object.keys(this.model).reduce(function (mappedModel, key) {\n\n var keyArray = key.split('.');\n var base = mappedModel;\n while (keyArray.length) {\n var currentKey = keyArray.shift();\n base = (base[currentKey] = keyArray.length ? base[currentKey] || {} : this.model[key]);\n }\n\n return mappedModel;\n\n }.bind(this), {}));\n }\n },\n\n // Goes through all registered components and\n // updates the model values\n updateModel: function () {\n Object.keys(this.inputs).forEach(function (name) {\n var component = this.inputs[name];\n this.model[name] = component.state._value;\n }.bind(this));\n },\n\n // Reset each key in the model to the original / initial / specified value\n resetModel: function (data) {\n Object.keys(this.inputs).forEach(function (name) {\n if (data && data[name]) {\n this.inputs[name].setValue(data[name]);\n } else {\n this.inputs[name].resetValue();\n }\n }.bind(this));\n this.validateForm();\n },\n\n setInputValidationErrors: function (errors) {\n Object.keys(this.inputs).forEach(function (name, index) {\n var component = this.inputs[name];\n var args = [{\n _isValid: !(name in errors),\n _validationError: typeof errors[name] === 'string' ? [errors[name]] : errors[name]\n }];\n component.setState.apply(component, args);\n }.bind(this));\n },\n\n // Checks if the values have changed from their initial value\n isChanged: function() {\n return !utils.isSame(this.getPristineValues(), this.getCurrentValues());\n },\n\n getPristineValues: function() {\n var inputs = this.inputs;\n return Object.keys(inputs).reduce(function (data, name) {\n var component = inputs[name];\n data[name] = component.props.value;\n return data;\n }, {});\n },\n\n // Go through errors from server and grab the components\n // stored in the inputs map. Change their state to invalid\n // and set the serverError message\n updateInputsWithError: function (errors) {\n Object.keys(errors).forEach(function (name, index) {\n var component = this.inputs[name];\n\n if (!component) {\n throw new Error('You are trying to update an input that does not exist. Verify errors object with input names. ' + JSON.stringify(errors));\n }\n var args = [{\n _isValid: this.props.preventExternalInvalidation || false,\n _externalError: typeof errors[name] === 'string' ? [errors[name]] : errors[name]\n }];\n component.setState.apply(component, args);\n }.bind(this));\n },\n\n isFormDisabled: function () {\n return this.props.disabled;\n },\n\n getCurrentValues: function () {\n return Object.keys(this.inputs).reduce(function (data, name) {\n var component = this.inputs[name];\n data[name] = component.state._value;\n return data;\n }.bind(this), {});\n },\n\n setFormPristine: function (isPristine) {\n var inputs = this.inputs;\n var inputKeys = Object.keys(inputs);\n\n this.setState({\n _formSubmitted: !isPristine\n })\n\n // Iterate through each component and set it as pristine\n // or \"dirty\".\n inputKeys.forEach(function (name, index) {\n var component = inputs[name];\n component.setState({\n _formSubmitted: !isPristine,\n _isPristine: isPristine\n });\n }.bind(this));\n },\n\n // Use the binded values and the actual input value to\n // validate the input and set its state. Then check the\n // state of the form itself\n validate: function (component) {\n\n // Trigger onChange\n if (this.state.canChange) {\n this.props.onChange(this.getCurrentValues(), this.isChanged());\n }\n\n var validation = this.runValidation(component);\n // Run through the validations, split them up and call\n // the validator IF there is a value or it is required\n component.setState({\n _isValid: validation.isValid,\n _isRequired: validation.isRequired,\n _validationError: validation.error,\n _externalError: null\n }, this.validateForm);\n\n },\n\n // Checks validation on current value or a passed value\n runValidation: function (component, value) {\n\n var currentValues = this.getCurrentValues();\n var validationErrors = component.props.validationErrors;\n var validationError = component.props.validationError;\n value = arguments.length === 2 ? value : component.state._value;\n\n var validationResults = this.runRules(value, currentValues, component._validations);\n var requiredResults = this.runRules(value, currentValues, component._requiredValidations);\n\n // the component defines an explicit validate function\n if (typeof component.validate === \"function\") {\n validationResults.failed = component.validate() ? [] : ['failed'];\n }\n\n var isRequired = Object.keys(component._requiredValidations).length ? !!requiredResults.success.length : false;\n var isValid = !validationResults.failed.length && !(this.props.validationErrors && this.props.validationErrors[component.props.name]);\n\n return {\n isRequired: isRequired,\n isValid: isRequired ? false : isValid,\n error: (function () {\n\n if (isValid && !isRequired) {\n return [];\n }\n\n if (validationResults.errors.length) {\n return validationResults.errors;\n }\n\n if (this.props.validationErrors && this.props.validationErrors[component.props.name]) {\n return typeof this.props.validationErrors[component.props.name] === 'string' ? [this.props.validationErrors[component.props.name]] : this.props.validationErrors[component.props.name];\n }\n\n if (isRequired) {\n var error = validationErrors[requiredResults.success[0]];\n return error ? [error] : null;\n }\n\n if (validationResults.failed.length) {\n return validationResults.failed.map(function(failed) {\n return validationErrors[failed] ? validationErrors[failed] : validationError;\n }).filter(function(x, pos, arr) {\n // Remove duplicates\n return arr.indexOf(x) === pos;\n });\n }\n\n }.call(this))\n };\n\n },\n\n runRules: function (value, currentValues, validations) {\n\n var results = {\n errors: [],\n failed: [],\n success: []\n };\n if (Object.keys(validations).length) {\n Object.keys(validations).forEach(function (validationMethod) {\n\n if (validationRules[validationMethod] && typeof validations[validationMethod] === 'function') {\n throw new Error('Formsy does not allow you to override default validations: ' + validationMethod);\n }\n\n if (!validationRules[validationMethod] && typeof validations[validationMethod] !== 'function') {\n throw new Error('Formsy does not have the validation rule: ' + validationMethod);\n }\n\n if (typeof validations[validationMethod] === 'function') {\n var validation = validations[validationMethod](currentValues, value);\n if (typeof validation === 'string') {\n results.errors.push(validation);\n results.failed.push(validationMethod);\n } else if (!validation) {\n results.failed.push(validationMethod);\n }\n return;\n\n } else if (typeof validations[validationMethod] !== 'function') {\n var validation = validationRules[validationMethod](currentValues, value, validations[validationMethod]);\n if (typeof validation === 'string') {\n results.errors.push(validation);\n results.failed.push(validationMethod);\n } else if (!validation) {\n results.failed.push(validationMethod);\n } else {\n results.success.push(validationMethod);\n }\n return;\n\n }\n\n return results.success.push(validationMethod);\n\n });\n }\n\n return results;\n\n },\n\n // Validate the form by going through all child input components\n // and check their state\n validateForm: function () {\n var allIsValid;\n var inputs = this.inputs;\n var inputKeys = Object.keys(inputs);\n\n // We need a callback as we are validating all inputs again. This will\n // run when the last component has set its state\n var onValidationComplete = function () {\n allIsValid = inputKeys.every(function (name) {\n return inputs[name].state._isValid;\n }.bind(this));\n\n this.setState({\n isValid: allIsValid\n });\n\n if (allIsValid) {\n this.props.onValid();\n } else {\n this.props.onInvalid();\n }\n\n // Tell the form that it can start to trigger change events\n this.setState({\n canChange: true\n });\n\n }.bind(this);\n\n // Run validation again in case affected by other inputs. The\n // last component validated will run the onValidationComplete callback\n inputKeys.forEach(function (name, index) {\n var component = inputs[name];\n var validation = this.runValidation(component);\n if (validation.isValid && component.state._externalError) {\n validation.isValid = false;\n }\n component.setState({\n _isValid: validation.isValid,\n _isRequired: validation.isRequired,\n _validationError: validation.error,\n _externalError: !validation.isValid && component.state._externalError ? component.state._externalError : null\n }, index === inputKeys.length - 1 ? onValidationComplete : null);\n }.bind(this));\n\n // If there are no inputs, set state where form is ready to trigger\n // change event. New inputs might be added later\n if (!inputKeys.length && this.isMounted()) {\n this.setState({\n canChange: true\n });\n }\n },\n\n // Method put on each input component to register\n // itself to the form\n attachToForm: function (component) {\n this.inputs[component.props.name] = component;\n this.model[component.props.name] = component.state._value;\n this.validate(component);\n },\n\n // Method put on each input component to unregister\n // itself from the form\n detachFromForm: function (component) {\n delete this.inputs[component.props.name];\n delete this.model[component.props.name];\n this.validateForm();\n },\n render: function () {\n\n return (\n
\n {this.props.children}\n
\n );\n\n }\n});\n\nif (!global.exports && !global.module && (!global.define || !global.define.amd)) {\n global.Formsy = Formsy;\n}\n\nmodule.exports = Formsy;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/main.js\n **/","module.exports = __WEBPACK_EXTERNAL_MODULE_1__;\n\n\n/*****************\n ** WEBPACK FOOTER\n ** external \"react\"\n ** module id = 1\n ** module chunks = 0\n **/","var utils = require('./utils.js');\nvar React = global.React || require('react');\n\nvar convertValidationsToObject = function (validations) {\n\n if (typeof validations === 'string') {\n\n return validations.split(/\\,(?![^{\\[]*[}\\]])/g).reduce(function (validations, validation) {\n var args = validation.split(':');\n var validateMethod = args.shift();\n\n args = args.map(function (arg) {\n try {\n return JSON.parse(arg);\n } catch (e) {\n return arg; // It is a string if it can not parse it\n }\n });\n\n if (args.length > 1) {\n throw new Error('Formsy does not support multiple args on string validations. Use object format of validations instead.');\n }\n\n validations[validateMethod] = args.length ? args[0] : true;\n return validations;\n }, {});\n\n }\n\n return validations || {};\n};\n\nmodule.exports = {\n getInitialState: function () {\n return {\n _value: this.props.value,\n _isRequired: false,\n _isValid: true,\n _isPristine: true,\n _pristineValue: this.props.value,\n _validationError: [],\n _externalError: null,\n _formSubmitted: false\n };\n },\n contextTypes: {\n formsy: React.PropTypes.object // What about required?\n },\n getDefaultProps: function () {\n return {\n validationError: '',\n validationErrors: {}\n };\n },\n\n componentWillMount: function () {\n var configure = function () {\n this.setValidations(this.props.validations, this.props.required);\n\n // Pass a function instead?\n this.context.formsy.attachToForm(this);\n //this.props._attachToForm(this);\n }.bind(this);\n\n if (!this.props.name) {\n throw new Error('Form Input requires a name property when used');\n }\n\n /*\n if (!this.props._attachToForm) {\n return setTimeout(function () {\n if (!this.isMounted()) return;\n if (!this.props._attachToForm) {\n throw new Error('Form Mixin requires component to be nested in a Form');\n }\n configure();\n }.bind(this), 0);\n }\n */\n configure();\n },\n\n // We have to make the validate method is kept when new props are added\n componentWillReceiveProps: function (nextProps) {\n this.setValidations(nextProps.validations, nextProps.required);\n\n },\n\n componentDidUpdate: function (prevProps) {\n\n // If the value passed has changed, set it. If value is not passed it will\n // internally update, and this will never run\n if (!utils.isSame(this.props.value, prevProps.value)) {\n this.setValue(this.props.value);\n }\n\n // If validations or required is changed, run a new validation\n if (!utils.isSame(this.props.validations, prevProps.validations) || !utils.isSame(this.props.required, prevProps.required)) {\n this.context.formsy.validate(this);\n }\n },\n\n // Detach it when component unmounts\n componentWillUnmount: function () {\n this.context.formsy.detachFromForm(this);\n //this.props._detachFromForm(this);\n },\n\n setValidations: function (validations, required) {\n\n // Add validations to the store itself as the props object can not be modified\n this._validations = convertValidationsToObject(validations) || {};\n this._requiredValidations = required === true ? {isDefaultRequiredValue: true} : convertValidationsToObject(required);\n\n },\n\n // We validate after the value has been set\n setValue: function (value) {\n this.setState({\n _value: value,\n _isPristine: false\n }, function () {\n this.context.formsy.validate(this);\n //this.props._validate(this);\n }.bind(this));\n },\n resetValue: function () {\n this.setState({\n _value: this.state._pristineValue,\n _isPristine: true\n }, function () {\n this.context.formsy.validate(this);\n //this.props._validate(this);\n });\n },\n getValue: function () {\n return this.state._value;\n },\n hasValue: function () {\n return this.state._value !== '';\n },\n getErrorMessage: function () {\n var messages = this.getErrorMessages();\n return messages.length ? messages[0] : null;\n },\n getErrorMessages: function () {\n return !this.isValid() || this.showRequired() ? (this.state._externalError || this.state._validationError || []) : [];\n },\n isFormDisabled: function () {\n return this.context.formsy.isFormDisabled();\n //return this.props._isFormDisabled();\n },\n isValid: function () {\n return this.state._isValid;\n },\n isPristine: function () {\n return this.state._isPristine;\n },\n isFormSubmitted: function () {\n return this.state._formSubmitted;\n },\n isRequired: function () {\n return !!this.props.required;\n },\n showRequired: function () {\n return this.state._isRequired;\n },\n showError: function () {\n return !this.showRequired() && !this.isValid();\n },\n isValidValue: function (value) {\n return this.context.formsy.isValidValue.call(null, this, value);\n //return this.props._isValidValue.call(null, this, value);\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Mixin.js\n **/","module.exports = {\n arraysDiffer: function (a, b) {\n var isDifferent = false;\n if (a.length !== b.length) {\n isDifferent = true;\n } else {\n a.forEach(function (item, index) {\n if (!this.isSame(item, b[index])) {\n isDifferent = true;\n }\n }, this);\n }\n return isDifferent;\n },\n\n objectsDiffer: function (a, b) {\n var isDifferent = false;\n if (Object.keys(a).length !== Object.keys(b).length) {\n isDifferent = true;\n } else {\n Object.keys(a).forEach(function (key) {\n if (!this.isSame(a[key], b[key])) {\n isDifferent = true;\n }\n }, this);\n }\n return isDifferent;\n },\n\n isSame: function (a, b) {\n if (typeof a !== typeof b) {\n return false;\n } else if (Array.isArray(a)) {\n return !this.arraysDiffer(a, b);\n } else if (typeof a === 'object' && a !== null && b !== null) {\n return !this.objectsDiffer(a, b);\n }\n\n return a === b;\n }\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/utils.js\n **/","var React = global.React || require('react');\nvar Mixin = require('./Mixin.js');\nmodule.exports = function () {\n return function (Component) {\n return React.createClass({\n mixins: [Mixin],\n render: function () {\n return React.createElement(Component, {\n setValidations: this.setValidations,\n setValue: this.setValue,\n resetValue: this.resetValue,\n getValue: this.getValue,\n hasValue: this.hasValue,\n getErrorMessage: this.getErrorMessage,\n getErrorMessages: this.getErrorMessages,\n isFormDisabled: this.isFormDisabled,\n isValid: this.isValid,\n isPristine: this.isPristine,\n isFormSubmitted: this.isFormSubmitted,\n isRequired: this.isRequired,\n showRequired: this.showRequired,\n showError: this.showError,\n isValidValue: this.isValidValue,\n ...this.props\n });\n }\n });\n };\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/Decorator.js\n **/","var React = global.React || require('react');\nvar Mixin = require('./Mixin.js');\nmodule.exports = function (Component) {\n return React.createClass({\n mixins: [Mixin],\n render: function () {\n return React.createElement(Component, {\n setValidations: this.setValidations,\n setValue: this.setValue,\n resetValue: this.resetValue,\n getValue: this.getValue,\n hasValue: this.hasValue,\n getErrorMessage: this.getErrorMessage,\n getErrorMessages: this.getErrorMessages,\n isFormDisabled: this.isFormDisabled,\n isValid: this.isValid,\n isPristine: this.isPristine,\n isFormSubmitted: this.isFormSubmitted,\n isRequired: this.isRequired,\n showRequired: this.showRequired,\n showError: this.showError,\n isValidValue: this.isValidValue,\n ...this.props\n });\n }\n });\n};\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/HOC.js\n **/","var isExisty = function (value) {\n return value !== null && value !== undefined;\n};\n\nvar isEmpty = function (value) {\n return value === '';\n};\n\nvar validations = {\n isDefaultRequiredValue: function (values, value) {\n return value === undefined || value === '';\n },\n isExisty: function (values, value) {\n return isExisty(value);\n },\n matchRegexp: function (values, value, regexp) {\n return !isExisty(value) || isEmpty(value) || regexp.test(value);\n },\n isUndefined: function (values, value) {\n return value === undefined;\n },\n isEmptyString: function (values, value) {\n return isEmpty(value);\n },\n isEmail: function (values, value) {\n return validations.matchRegexp(values, value, /^((([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);\n },\n isUrl: function (values, value) {\n return validations.matchRegexp(values, value, /^(https?|s?ftp):\\/\\/(((([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);\n },\n isTrue: function (values, value) {\n return value === true;\n },\n isFalse: function (values, value) {\n return value === false;\n },\n isNumeric: function (values, value) {\n if (typeof value === 'number') {\n return true;\n }\n return validations.matchRegexp(values, value, /^[-+]?(?:\\d*[.])?\\d+$/);\n },\n isAlpha: function (values, value) {\n return validations.matchRegexp(values, value, /^[A-Z]+$/i);\n },\n isAlphanumeric: function (values, value) {\n return validations.matchRegexp(values, value, /^[0-9A-Z]+$/i);\n },\n isInt: function (values, value) {\n return validations.matchRegexp(values, value, /^(?:[-+]?(?:0|[1-9]\\d*))$/);\n },\n isFloat: function (values, value) {\n return validations.matchRegexp(values, value, /^(?:[-+]?(?:\\d+))?(?:\\.\\d*)?(?:[eE][\\+\\-]?(?:\\d+))?$/);\n },\n isWords: function (values, value) {\n return validations.matchRegexp(values, value, /^[A-Z\\s]+$/i);\n },\n isSpecialWords: function (values, value) {\n return validations.matchRegexp(values, value, /^[A-Z\\s\\u00C0-\\u017F]+$/i);\n },\n isLength: function (values, value, length) {\n return !isExisty(value) || isEmpty(value) || value.length === length;\n },\n equals: function (values, value, eql) {\n return !isExisty(value) || isEmpty(value) || value == eql;\n },\n equalsField: function (values, value, field) {\n return value == values[field];\n },\n maxLength: function (values, value, length) {\n return !isExisty(value) || value.length <= length;\n },\n minLength: function (values, value, length) {\n return !isExisty(value) || isEmpty(value) || value.length >= length;\n }\n};\n\nmodule.exports = validations;\n\n\n\n/** WEBPACK FOOTER **\n ** ./src/validationRules.js\n **/","module.exports = function (source) {\n\n\n // \"foo[0]\"\n return Object.keys(source).reduce(function (output, key) {\n\n var parentKey = key.match(/[^\\[]*/i);\n var paths = key.match(/\\[.*?\\]/g) || [];\n paths = [parentKey[0]].concat(paths).map(function (key) {\n return key.replace(/\\[|\\]/g, '');\n });\n\n var currentPath = output;\n while (paths.length) {\n\n var pathKey = paths.shift();\n\n if (pathKey in currentPath) {\n currentPath = currentPath[pathKey];\n } else {\n currentPath[pathKey] = paths.length ? isNaN(paths[0]) ? {} : [] : source[key];\n currentPath = currentPath[pathKey];\n }\n\n }\n\n return output;\n\n }, {});\n\n};\n\n\n\n/*****************\n ** WEBPACK FOOTER\n ** ./~/form-data-to-object/index.js\n ** module id = 7\n ** module chunks = 0\n **/"],"sourceRoot":""} \ No newline at end of file