ValidationInfo

data class ValidationInfo(val state: State, val property: KProperty<*>, val message: String)(source)

Information that indicates a failed validation.

A successful validation is typically represented by a null value instead of a ValidationInfo instance.

Constructors

Link copied to clipboard
constructor(state: State, property: KProperty<*>, message: String)

Properties

Link copied to clipboard
val message: String

A string explaining why the state is invalid.

Link copied to clipboard
val property: KProperty<*>

The property within the state that is invalid.

Link copied to clipboard

The state that is invalid.

Functions

Link copied to clipboard
fun prepend(prefix: String, separator: String = " > "): ValidationInfo

Returns a new ValidationInfo with the prefix and separator prepended to the message.