Client:OAuth2: fix form validation
This commit is contained in:
parent
f6f8f67757
commit
fa4a1c5213
@ -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];
|
||||
|
Loading…
Reference in New Issue
Block a user