From 3df155f4f161de5af51b970ba610ff652ef4e4ca Mon Sep 17 00:00:00 2001 From: pory <83127821+pory-gone@users.noreply.github.com> Date: Mon, 22 Sep 2025 19:43:41 +0200 Subject: [PATCH] fixing magic code input error (#2514) Co-authored-by: pory-gone --- components/form.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/form.js b/components/form.js index 67732bca..3267169b 100644 --- a/components/form.js +++ b/components/form.js @@ -1451,6 +1451,7 @@ export function MultiInput ({ onChange, autoFocus, hideError, inputType = 'text', ...props }) { + const formik = useFormikContext() const [inputs, setInputs] = useState(new Array(length).fill('')) const inputRefs = useRef(new Array(length).fill(null)) const [, meta, helpers] = useField({ name }) @@ -1549,7 +1550,7 @@ export function MultiInput ({ ))}
- {hideError && meta.touched && meta.error && ( // custom error message is showed if hideError is true + {hideError && formik.submitCount > 0 && meta.touched && meta.error && ( // custom error message is showed if hideError is true {meta.error}