Invalid

Fields with this state are invalid and will prevent their Form from becoming ready.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int

Inherited functions

Link copied to clipboard
inline fun <R, T> Form.FieldState<T>.fold(onValid: (value: T) -> R, default: R): R

Returns the result of onValid if this instance is valid or default if it is invalid.

Link copied to clipboard
inline fun <T> Form.FieldState<T>.ifInvalid(onInvalid: () -> Unit)

Does the action of onInvalid if this instance is invalid.

Link copied to clipboard
inline fun <T> Form.FieldState<T>.ifValid(onValid: (value: T) -> Unit)

Does the action of onValid if this instance is valid.

Link copied to clipboard
inline fun <T, R> Form.FieldState<T>.map(onValid: (value: T) -> R): Form.FieldState<R>

Returns a valid state from the result of onValid if this instance is valid or invalid otherwise.