diff --git a/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/index.tsx b/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/index.tsx index 36da4521b7..c67b0d0578 100644 --- a/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/index.tsx +++ b/packages/client/src/pages/PortalSettings/categories/developer-tools/OAuth/sub-components/ClientForm/index.tsx @@ -208,11 +208,11 @@ const ClientForm = ({ ) { isValid = false; - nameTimer.current = setTimeout(() => { + return (nameTimer.current = setTimeout(() => { setErrorFields((value) => { return [...value, key]; }); - }, 300); + }, 300)); } if ( @@ -224,8 +224,12 @@ const ClientForm = ({ }); if (nameTimer.current) clearTimeout(nameTimer.current); nameTimer.current = null; + + return; } + isValid = !errorFields.includes(key); + break; } } @@ -271,6 +275,8 @@ const ClientForm = ({ nameTimer.current = null; } + isValid = errorFields.includes(key); + break; case "logo": isValid = isValid && !!form[key];