Skip to content
This repository was archived by the owner on May 30, 2023. It is now read-only.

Commit 0e76641

Browse files
author
Lộc Phạm
authored
fix: not validate when register (#326)
1 parent 2627839 commit 0e76641

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/routes/RegisterPage/UserInfoForm.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,12 @@ const UserInfoForm = function ({
126126
if (recaptchaRef && recaptchaRef.current) {
127127
const token = await recaptchaRef.current.executeAsync();
128128
setValue("captcha", token || "");
129-
onSubmit(getValues());
129+
if (
130+
!errors ||
131+
(errors && Object.keys(errors).length <= 1 && errors.captcha)
132+
) {
133+
onSubmit(getValues());
134+
}
130135
}
131136
};
132137

0 commit comments

Comments
 (0)