@steroidsjs/core 3.0.86 → 3.0.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/ui/form/Form/Form.js +3 -3
package/package.json
CHANGED
package/ui/form/Form/Form.js
CHANGED
|
@@ -218,12 +218,12 @@ function Form(props) {
|
|
|
218
218
|
});
|
|
219
219
|
// Clean
|
|
220
220
|
cleanedValues = (0, form_1.cleanEmptyObject)(cleanedValues);
|
|
221
|
-
|
|
222
|
-
if (props.onBeforeSubmit && props.onBeforeSubmit.call(null, cleanedValues) === false) {
|
|
221
|
+
if (props.validator && props.validator.call(null, cleanedValues) === false) {
|
|
223
222
|
dispatch((0, form_2.formSetSubmitting)(props.formId, false));
|
|
224
223
|
return [2 /*return*/, null];
|
|
225
224
|
}
|
|
226
|
-
|
|
225
|
+
// Event onBeforeSubmit
|
|
226
|
+
if (props.onBeforeSubmit && props.onBeforeSubmit.call(null, cleanedValues) === false) {
|
|
227
227
|
dispatch((0, form_2.formSetSubmitting)(props.formId, false));
|
|
228
228
|
return [2 /*return*/, null];
|
|
229
229
|
}
|