Skip to content

Commit

Permalink
fix: execution order
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffreyArt1 committed Aug 6, 2024
1 parent 2eb5223 commit 9a3d5db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/[lang]/identification/form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,14 @@ export function Form() {
<form
action={action}
onSubmit={async (e) => {
await executeRecaptcha('form_submit').then(setToken);

if (!formState.isValid) {
e.preventDefault();
trigger();
return false;
}

await executeRecaptcha('form_submit').then(setToken);

e.currentTarget?.requestSubmit();
}}
>
Expand Down

0 comments on commit 9a3d5db

Please sign in to comment.