fix: useForm style error, close #5635

pull/5642/head
tangjinzhou 3 years ago
parent 09ff91488c
commit 44e1f020c8

@ -252,7 +252,7 @@ function useForm(
if (validateInfos[name].validateStatus === 'validating') {
const res = results.filter(result => result && result.errors.length);
validateInfos[name].validateStatus = res.length ? 'error' : 'success';
validateInfos[name].help = res.length ? res.map(r => r.errors) : '';
validateInfos[name].help = res.length ? res.map(r => r.errors) : null;
options?.onValidate?.(
name,
!res.length,
@ -293,7 +293,7 @@ function useForm(
validateInfos[key] &&
Object.assign(validateInfos[key], {
validateStatus: '',
help: '',
help: null,
});
});
};

Loading…
Cancel
Save