From bb424251d53fa6bfed22c1f5377ec6a8dfc78f2d Mon Sep 17 00:00:00 2001 From: Nikita Zolotykh Date: Mon, 11 Mar 2024 15:40:11 +0300 Subject: [PATCH] fix: add condition that removes validate of hidden fields --- src/lib/core/components/Form/Controller/utils.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/core/components/Form/Controller/utils.tsx b/src/lib/core/components/Form/Controller/utils.tsx index 7fe2390d..e1dda489 100644 --- a/src/lib/core/components/Form/Controller/utils.tsx +++ b/src/lib/core/components/Form/Controller/utils.tsx @@ -195,7 +195,7 @@ export const getValidate = < }: GetValidateParams) => { let validate: (value?: Value) => ValidateError = () => undefined; - if (isCorrectConfig(config) && isCorrectSpec(spec)) { + if (isCorrectConfig(config) && isCorrectSpec(spec) && !spec.viewSpec.hidden) { const {validators} = config[spec.type] as unknown as | TypeConfig | Record;