@levshitsvv/formsy-react
Advanced tools
Comparing version 2.0.2 to 2.0.3
@@ -280,9 +280,12 @@ 'use strict'; | ||
_this.setFormPristine(false); | ||
var model = _this.getModel(); | ||
_this.props.onSubmit(model, _this.resetModel, _this.updateInputsWithError); | ||
if (_this.state.isValid) { | ||
_this.props.onValidSubmit(model, _this.resetModel, _this.updateInputsWithError); | ||
} else { | ||
_this.props.onInvalidSubmit(model, _this.resetModel, _this.updateInputsWithError); | ||
} | ||
return _this.validateForm().then(function () { | ||
var model = _this.getModel(); | ||
_this.props.onSubmit(model, _this.resetModel, _this.updateInputsWithError); | ||
if (_this.state.isValid) { | ||
_this.props.onValidSubmit(model, _this.resetModel, _this.updateInputsWithError); | ||
} else { | ||
_this.props.onInvalidSubmit(model, _this.resetModel, _this.updateInputsWithError); | ||
} | ||
}); | ||
}; | ||
@@ -321,3 +324,3 @@ | ||
externalError: null | ||
}, _this.validateForm); | ||
}, null); | ||
}); | ||
@@ -324,0 +327,0 @@ }; |
{ | ||
"name": "@levshitsvv/formsy-react", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"description": "A form input builder and validator for React", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
48933
874