mki-formsy-react
Advanced tools
Comparing version 0.21.0 to 0.22.0
@@ -28,2 +28,3 @@ # API | ||
- [getErrorMessage()](#geterrormessage) | ||
- [getErrorMessages()](#geterrormessages) | ||
- [isValid()](#isvalid) | ||
@@ -360,2 +361,5 @@ - [isValidValue()](#isvalidvalue) | ||
#### <a name="geterrormessages">getErrorMessages()</a> | ||
Will return the validation messages set if the form input component is invalid. If form input component is valid it returns empty array. | ||
#### <a name="isvalid">isValid()</a> | ||
@@ -362,0 +366,0 @@ ```jsx |
@@ -9,2 +9,3 @@ 'use strict'; | ||
return React.createClass({ | ||
displayName: 'Formsy(' + getDisplayName(Component) + ')', | ||
mixins: [Mixin], | ||
@@ -31,2 +32,6 @@ render: function render() { | ||
}); | ||
}; | ||
}; | ||
function getDisplayName(Component) { | ||
return Component.displayName || Component.name || (typeof Component === 'string' ? Component : 'Component'); | ||
} |
@@ -48,3 +48,2 @@ 'use strict'; | ||
onInvalidSubmit: function onInvalidSubmit() {}, | ||
onSubmitted: function onSubmitted() {}, | ||
onValid: function onValid() {}, | ||
@@ -439,2 +438,3 @@ onInvalid: function onInvalid() {}, | ||
var onValid = _props.onValid; | ||
var onValidSubmit = _props.onValidSubmit; | ||
var onInvalid = _props.onInvalid; | ||
@@ -449,3 +449,3 @@ var onInvalidSubmit = _props.onInvalidSubmit; | ||
var nonFormsyProps = _objectWithoutProperties(_props, ['mapping', 'validationErrors', 'onSubmit', 'onValid', 'onInvalid', 'onInvalidSubmit', 'onChange', 'reset', 'preventExternalInvalidation', 'onSuccess', 'onError', 'skipFormRender']); | ||
var nonFormsyProps = _objectWithoutProperties(_props, ['mapping', 'validationErrors', 'onSubmit', 'onValid', 'onValidSubmit', 'onInvalid', 'onInvalidSubmit', 'onChange', 'reset', 'preventExternalInvalidation', 'onSuccess', 'onError', 'skipFormRender']); | ||
@@ -452,0 +452,0 @@ if (skipFormRender) { |
@@ -39,2 +39,4 @@ 'use strict'; | ||
return !this.arraysDiffer(a, b); | ||
} else if (typeof a === 'function') { | ||
return a.toString() === b.toString(); | ||
} else if ((typeof a === 'undefined' ? 'undefined' : _typeof(a)) === 'object' && a !== null && b !== null) { | ||
@@ -41,0 +43,0 @@ return !this.objectsDiffer(a, b); |
{ | ||
"name": "mki-formsy-react", | ||
"version": "0.21.0", | ||
"version": "0.22.0", | ||
"description": "A form input builder and validator for React JS", | ||
@@ -33,15 +33,16 @@ "repository": { | ||
"devDependencies": { | ||
"babel-cli": "^6.6.5", | ||
"babel-cli": "^6.10.1", | ||
"babel-core": "^6.10.4", | ||
"babel-loader": "^6.2.4", | ||
"babel-preset-es2015": "^6.6.0", | ||
"babel-preset-react": "^6.5.0", | ||
"babel-preset-stage-2": "^6.5.0", | ||
"jsdom": "^6.5.1", | ||
"babel-preset-es2015": "^6.9.0", | ||
"babel-preset-react": "^6.11.1", | ||
"babel-preset-stage-2": "^6.11.0", | ||
"jsdom": "^9.4.1", | ||
"nodeunit": "^0.9.1", | ||
"react": "^15.0.0", | ||
"react-addons-pure-render-mixin": "^15.0.0", | ||
"react-addons-test-utils": "^15.0.0", | ||
"react-dom": "^15.0.0", | ||
"sinon": "^1.17.3", | ||
"webpack": "^1.12.14", | ||
"react": "^15.2.0", | ||
"react-addons-pure-render-mixin": "^15.2.0", | ||
"react-addons-test-utils": "^15.2.0", | ||
"react-dom": "^15.2.0", | ||
"sinon": "^1.17.4", | ||
"webpack": "^1.13.1", | ||
"webpack-dev-server": "^1.14.1" | ||
@@ -48,0 +49,0 @@ }, |
@@ -5,2 +5,3 @@ var React = global.React || require('react'); | ||
return React.createClass({ | ||
displayName: 'Formsy(' + getDisplayName(Component) + ')', | ||
mixins: [Mixin], | ||
@@ -29,1 +30,9 @@ render: function () { | ||
}; | ||
function getDisplayName(Component) { | ||
return ( | ||
Component.displayName || | ||
Component.name || | ||
(typeof Component === 'string' ? Component : 'Component') | ||
); | ||
} |
@@ -40,3 +40,2 @@ var React = global.React || require('react'); | ||
onInvalidSubmit: function () {}, | ||
onSubmitted: function () {}, | ||
onValid: function () {}, | ||
@@ -433,2 +432,3 @@ onInvalid: function () {}, | ||
onValid, | ||
onValidSubmit, | ||
onInvalid, | ||
@@ -435,0 +435,0 @@ onInvalidSubmit, |
@@ -35,2 +35,4 @@ module.exports = { | ||
return !this.arraysDiffer(a, b); | ||
} else if (typeof a === 'function') { | ||
return a.toString() === b.toString(); | ||
} else if (typeof a === 'object' && a !== null && b !== null) { | ||
@@ -37,0 +39,0 @@ return !this.objectsDiffer(a, b); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
91853
1505
0
15