TanStackT
TanStack2mo ago
7 replies
skinny-azure

Validate Form but not submitting

Is there a way to validate the input without submitting the form?
already tried this
<Button
  className="flex-1"
  onClick={async () => {
    const isValid = await organizationForm.validate("submit");
    if (isValid) {
      setIsDialogOpen(true);
    }
  }}
>
  Next
</Button>

but didnt work. the error validation did not appear
Was this page helpful?