From 44e1f020c84393161d998582e5c0506187ea60e9 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Tue, 24 May 2022 14:39:40 +0800 Subject: [PATCH] fix: useForm style error, close #5635 --- components/form/useForm.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/form/useForm.ts b/components/form/useForm.ts index cf34170ee..43a72f288 100644 --- a/components/form/useForm.ts +++ b/components/form/useForm.ts @@ -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, }); }); };