FieldOptions

interface FieldOptions(source)

Configuration options for field-level validation behavior.

This interface defines how and when validation should be performed for individual form fields, including validation timing strategies and debounce delays for different validation triggers.

Usage:

val fieldOptions = FieldOptions(
validationStrategy = FieldValidationStrategy(
initial = FieldValidationMode.Blur,
next = { current, isValid ->
if (isValid) FieldValidationMode.Blur else FieldValidationMode.Change
}
),
validationDelayOnChange = 300.milliseconds
)

Inheritors

Types

Link copied to clipboard

Default field options with sensible defaults for most use cases.

Properties

Link copied to clipboard

The delay before validation is triggered when a field loses focus.

Link copied to clipboard

The delay before validation is triggered when a field value changes. This helps prevent excessive validation calls during rapid typing.

Link copied to clipboard

The delay before validation is triggered when a field is first mounted.

Link copied to clipboard

The validation strategy that determines when validation should be triggered.