Package-level declarations

Types

Link copied to clipboard
data class Condition(val tags: ImmutableSet<String> = persistentSetOf(), val condition: (Form) -> Boolean = { true })
Link copied to clipboard
class CustomCondition(val tags: ImmutableSet<String> = persistentSetOf(), val onEval: (Element<*>, Form) -> Unit)

A custom condition that can be attached to an Element.

Link copied to clipboard
Link copied to clipboard
@RequiresOptIn(message = "This Kotose Form API is experimental and may change before it becomes stable.", level = RequiresOptIn.Level.WARNING)
annotation class ExperimentalKotoseFormApi

Marks an API that is available for evaluation but is not covered by the library's source or behavioral compatibility guarantees yet.

Link copied to clipboard
abstract class Field<ValueType>(tag: String?) : Element<ValidationRule.Field<ValueType>> , FieldEvent
Link copied to clipboard
abstract class FocusableField<ValueType>(tag: String?) : Field<ValueType>
Link copied to clipboard
class Form
Link copied to clipboard
interface FormEvent
Link copied to clipboard
data class FormNavigationRequest(val id: Long, val targetKey: String)

One programmatic navigation action. Keys survive inserted validation rows.

Link copied to clipboard
typealias GenericElement = Element<*>
Link copied to clipboard
open class Group(tag: String? = null) : Element<ValidationRule.Group>
Link copied to clipboard

This validation rule makes sure a field is not null or empty.

Link copied to clipboard

Exactly one visible option of the group must be selected. A selection kept on a hidden option does not count, because it is neither shown nor submitted by default.

Link copied to clipboard
interface RequiredValue

A domain value that can report whether it satisfies a required-value rule.

Link copied to clipboard
sealed class SealedFormEvents
Link copied to clipboard
Link copied to clipboard
abstract class ValidationError

The built-in errors expose a settable error so the app owns their wording, for example ValidationError.Required.error = R.string.required.toStrRes() once at startup.

Link copied to clipboard
Link copied to clipboard
sealed class ValidationRule

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun transaction(form: Form, reload: Boolean = true, init: Transaction.() -> Unit)
Link copied to clipboard
@JvmName(name = "formTransaction")
fun Form.transaction(reload: Boolean = true, init: Transaction.() -> Unit)