mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-11-29 18:48:32 +08:00
fix: useForm model change validate error
This commit is contained in:
parent
49e1323baa
commit
ffd4d8fe92
@ -214,11 +214,13 @@ function useForm(
|
||||
const errorList = results.filter(
|
||||
(result: { errors: string | any[] }) => result && result.errors.length,
|
||||
);
|
||||
return Promise.reject({
|
||||
values,
|
||||
errorFields: errorList,
|
||||
outOfDate: lastValidatePromise !== summaryPromise,
|
||||
});
|
||||
return errorList.length
|
||||
? Promise.reject({
|
||||
values,
|
||||
errorFields: errorList,
|
||||
outOfDate: lastValidatePromise !== summaryPromise,
|
||||
})
|
||||
: Promise.resolve(values);
|
||||
});
|
||||
|
||||
// Do not throw in console
|
||||
|
Loading…
Reference in New Issue
Block a user