Skip to main content
Version: 0.1.2

Interface: FieldConfig

Imported from @react-logic/utils

Per-field configuration. All fields optional — an empty {} is a text field with no validators and '' as the initial.

Type Parameters

T

T = string

The field's value type.

Properties

initial?

readonly optional initial?: T


kind?

readonly optional kind?: "text" | "checkbox" | "radio" | "select"


parse?

readonly optional parse?: (raw) => T

Parameters

raw

string

Returns

T


validators?

readonly optional validators?: readonly ValidatorEntry<T>[]