UNPKG

react-formal

Version:

Classy HTML form management for React

23 lines (22 loc) 581 B
import { Errors, Touched } from './types'; /** * Returns all errors for the form. * * @returns {Touched} */ declare function useTouched(): Errors; /** * Returns the current Field value at the provided path. * * @param path a path to retrieve errors for. * @returns {Touched} */ declare function useTouched(path: string): Touched; /** * Returns an array of values for the provided field paths. * * @param paths a set of paths to retrieve errors for. * @returns {Touched} */ declare function useTouched(paths: string[] | undefined): Touched; export default useTouched;