FormField

interface FormField

Common interface for pre-chat form fields that support user input, validation, and visibility control.

Inheritors

Properties

Link copied to clipboard

The current validation error state for this field.

Link copied to clipboard
abstract var isHidden: Boolean

Whether this field is hidden from the user in the form UI.

Link copied to clipboard
abstract var userInput: String

The current user-provided input value for this field.

Functions

Link copied to clipboard
abstract fun isValid(): Boolean

Returns true if the current userInput passes validation.

Link copied to clipboard
abstract fun validate(): PreChatErrorType

Validates the current userInput and returns the resulting PreChatErrorType.