Field

This contains props for text fields, meta information, and helpers.

field

Props for text field

name

string

Field name

value

any

Field value from values by name path

onChange

onChange(event: ChangeEvent<any>): void

Change event handler

onBlur

onBlur(): void

Blur event handler

meta

error

string | null

Field error from errors by name path

touched

boolean

Field touched from all touched by name path

helpers

setValue

setValue(value: any): void

Sets a new value for the field

setTouched

setTouched(isTouched?: boolean): void

Sets a new touched status for the field. Value by default is true.

setError

setError(message: string): void

Sets an external error for the field

Last updated