From cf17760735d466a5817fc37bc3dc6f3ad8c52f7a Mon Sep 17 00:00:00 2001 From: PatrikKozak Date: Mon, 27 Feb 2023 15:35:52 -0500 Subject: [PATCH] fix: skips field validation on submit if skipValidation is set to true --- src/admin/components/forms/Form/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/admin/components/forms/Form/index.tsx b/src/admin/components/forms/Form/index.tsx index b80b037153..802f67000f 100644 --- a/src/admin/components/forms/Form/index.tsx +++ b/src/admin/components/forms/Form/index.tsx @@ -141,7 +141,7 @@ const Form: React.FC = (props) => { const isValid = skipValidation ? true : await contextRef.current.validateForm(); - setSubmitted(true); + if (!skipValidation) setSubmitted(true); // If not valid, prevent submission if (!isValid) {