Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/netzo/deps/react-hook-form.ts>UseFormHandleSubmit

Deno-powered framework for building business web apps
Go to Latest
type alias UseFormHandleSubmit
import { type UseFormHandleSubmit } from "https://deno.land/x/netzo@0.3.91/deps/react-hook-form.ts";

Validate the entire form. Handle submit and error callback.

Examples

Example 1

const onSubmit = (data) => console.log(data);
const onError = (error) => console.log(error);

<form onSubmit={handleSubmit(onSubmit, onError)} />

Type Parameters

TFieldValues extends FieldValues
optional
TTransformedValues extends FieldValues | undefined = undefined
definition: (onValid: TTransformedValues extends FieldValues ? SubmitHandler<TTransformedValues> : SubmitHandler<TFieldValues>, onInvalid?: SubmitErrorHandler<TFieldValues>) => (e?: React.BaseSyntheticEvent) => Promise<void>