Form

a form that manages state for its fields

Props

errors

An object representing any errors in the data. They keys should match the keys in the value object.

{
""
}

infos

An object representing any information details in the data. They keys should match the keys in the value object.

{
""
}

messages

Custom validation messages.
{
invalid:
"string,"
required: string
}

onChange

Function that will be called when any fields are updated.
"function"

onReset

Function that will be called when the form is reset. The single argument is the event provided by react.

"function"

onSubmit

Function that will be called when the form is submitted. The single argument is an event containing the latest value object via event.value and an object indicating which fields were touched via event.touched.

"function"

validate

When to perform validation
"blur""submit"

value

An object representing all of the data in the form.
{
""
}