rememberFieldRuleControl
Deprecated
Please migrate to the new form implementation. This legacy code will be removed in a future version.
Remembers a field control for the given field name with the given rule set.
Usage:
rememberFieldRuleControl(
name = "First name",
select = { firstName },
update = { copy(firstName = it) }
) {
notBlank { "must be not blank" }
}
Parameters
The type of the form value.
The type of the field value.
The name of the field.
The function to select the field value.
The function to update the field value.
The function to determine if the field is enabled.
The set of field names that this field depends on.
The block to build the rule set.
Deprecated
Please migrate to the new form implementation. This legacy code will be removed in a future version.
Remembers a field control for the given field name with the given rule set.
Usage:
val ruleSet = rules<String> {
notBlank { "must be not blank" }
}
rememberFieldRuleControl(
name = "First name",
select = { firstName },
update = { copy(firstName = it) },
ruleSet = ruleSet
)
Parameters
The type of the form value.
The type of the field value.
The name of the field.
The function to select the field value.
The function to update the field value.
The function to determine if the field is enabled.
The set of field names that this field depends on.
The rule set to validate the field value.