import { type UseFormTrigger } from "https://deno.land/x/netzo@0.5.63/deps/react-hook-form.ts";
Trigger field or form validation
Examples
Example 1
Example 1
useEffect(() => {
trigger();
}, [trigger])
<button onClick={async () => {
const result = await trigger(); // result will be a boolean value
}}>
trigger
</button>
Type Parameters
TFieldValues extends FieldValues
definition: (name?: FieldPath<TFieldValues> | FieldPath<TFieldValues>[] | readonly FieldPath<TFieldValues>[], options?: TriggerConfig) => Promise<boolean>