From 63503bd4517d87c34498002c820aefaef22c501e Mon Sep 17 00:00:00 2001
From: Robert Jaros Adds a string control to the form.
@@ -18,14 +18,16 @@
+
Return Adds a boolean control to the form.
@@ -34,14 +36,16 @@ current form
add
-
-fun <C : StringFormControl> add(key: KProperty1<K, String?>, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K>
+
+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>
Parameters
control
- the string form controlrequired
- determines if the control is requiredrequiredMessage
- optional required validation messagevalidatorMessage
- optional function returning validation messagevalidator
- optional validation function
current formfun <C : BoolFormControl> add(key: KProperty1<K, Boolean?>, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K>
+
+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>
Parameters
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, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K>
+
+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.
@@ -50,14 +54,16 @@ current form
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 : KDateFormControl> add(key: KProperty1<K, KDate?>, control: C, required: Boolean = false, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K>
+
+fun <C : KDateFormControl> add(key: KProperty1<K, KDate?>, 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.
@@ -66,14 +72,16 @@ current form
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, validatorMessage: (C) -> String? = null, validator: (C) -> Boolean? = null): Form<K>
+
+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.
@@ -82,6 +90,8 @@ current form
control
- the files form control
required
- determines if the control is required
+requiredMessage
- optional required validation message
validatorMessage
- optional function returning validation message