Themes

Forms/Types/FieldOptions
FieldOptions

Validation and setup otions for fields

Name
Description
Type
checkExists

Pass a custom function to check if a value has been provided.

CheckExists<ItemType, T>
initialValue

The initial value of the field.

ItemType
message

Message to display if the value is not provided.

string | Message<ItemType, T>
optional

A boolean or function stating if a field is optional. (all keys are required by default.)

boolean | (data: T ) => boolean
validations

An array of validations to be called against the value on validations. Functions will only be called if checkExists returns true.

ItemType extends any[] ? ArrayValidation<ItemType, T>[] : Validation<ItemType, T>[]