kvision / pl.treksoft.kvision.form / Form / addCustom

addCustom

(js) fun <C : StringFormControl> addCustom(key: KProperty1<K, Any?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: ((C) -> String?)? = null, validator: ((C) -> Boolean?)? = null): Form<K>

Adds a string control to the form bound to custom field type.

Parameters

key - key identifier of the control

control - the string form control

required - determines if the control is required

requiredMessage - optional required validation message

validatorMessage - optional function returning validation message

validator - optional validation function

Return
current form