fix: restore error handling logic in form submission process
This commit is contained in:
parent
6c311f4b2e
commit
21c57270f4
|
|
@ -152,12 +152,11 @@ export const Form: React.FC<any> = ({
|
||||||
|
|
||||||
local.error = error;
|
local.error = error;
|
||||||
local.render();
|
local.render();
|
||||||
console.log(isError);
|
if (isError) {
|
||||||
// if (isError) {
|
throw new Error("please check your input field.");
|
||||||
// throw new Error("please check your input field.");
|
} else {
|
||||||
// } else {
|
await onSubmit(local);
|
||||||
// await onSubmit(local);
|
}
|
||||||
// }
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
toast.success(
|
toast.success(
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue