From eb930482e9972a21d39f2aea8b813acf58ff5b64 Mon Sep 17 00:00:00 2001 From: Robert Jaros Date: Mon, 22 Oct 2018 00:01:39 +0200 Subject: API documentation for KVision 0.0.19 --- api/pl.treksoft.kvision.form/-form/add.html | 102 ++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 api/pl.treksoft.kvision.form/-form/add.html (limited to 'api/pl.treksoft.kvision.form/-form/add.html') diff --git a/api/pl.treksoft.kvision.form/-form/add.html b/api/pl.treksoft.kvision.form/-form/add.html new file mode 100644 index 00000000..d1322272 --- /dev/null +++ b/api/pl.treksoft.kvision.form/-form/add.html @@ -0,0 +1,102 @@ + + + +Form.add - kvision + + + +kvision / pl.treksoft.kvision.form / Form / add
+
+

add

+ +fun <C : StringFormControl> add(key: KProperty1<K, String?>, 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.

+

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

+ +fun <C : BoolFormControl> add(key: KProperty1<K, Boolean?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K> +

Adds a boolean control to the form.

+

Parameters

+

+key - key identifier of the control

+

+control - the boolean 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

+ +fun <C : NumberFormControl> add(key: KProperty1<K, Number?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K> +

Adds a number control to the form.

+

Parameters

+

+key - key identifier of the control

+

+control - the number 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

+ +fun <C : DateFormControl> add(key: KProperty1<K, Date?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K> +

Adds a date control to the form.

+

Parameters

+

+key - key identifier of the control

+

+control - the date 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

+ +fun <C : KFilesFormControl> add(key: KProperty1<K, List<KFile>?>, control: C, required: Boolean = false, requiredMessage: String? = null, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K> +

Adds a files control to the form.

+

Parameters

+

+key - key identifier of the control

+

+control - the files 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

+ + -- cgit