Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

UseFormClearErrors

Clear the entire form errors.

@example

Clear all errors

clearErrors(); // clear the entire form error
clearErrors(["name", "name1"]) // clear an array of fields' error
clearErrors("name2"); // clear a single field error
type UseFormClearErrors<TFieldValues extends FieldValues> = (name?:
| FieldPath<TFieldValues>
| FieldPath<TFieldValues>[]
| readonly FieldPath<TFieldValues>[]
| `root.${string}`
| "root"
) => void
;

§Type Parameters

§
TFieldValues extends FieldValues
[src]

§Type

§
(name?: FieldPath<TFieldValues> | FieldPath<TFieldValues>[] | readonly FieldPath<TFieldValues>[] | `root.${string}` | "root") => void
[src]