UNPKG

@modular-forms/react

Version:

The modular and type-safe form library for React

11 lines (10 loc) 485 B
import type { FieldPath, FieldValues, FormStore, Maybe, ResponseData } from '../types'; /** * Returns a list with the names of all fields. * * @param form The form of the fields. * @param shouldValid Whether to be valid. * * @returns All field names of the form. */ export declare function getFieldNames<TFieldValues extends FieldValues, TResponseData extends ResponseData>(form: FormStore<TFieldValues, TResponseData>, shouldValid?: Maybe<boolean>): FieldPath<TFieldValues>[];