diff --git a/form-builder/com.dsc.form_builder.format/-card-formatter/index.html b/form-builder/com.dsc.form_builder.format/-card-formatter/index.html index be8cf76..3d27015 100644 --- a/form-builder/com.dsc.form_builder.format/-card-formatter/index.html +++ b/form-builder/com.dsc.form_builder.format/-card-formatter/index.html @@ -65,7 +65,7 @@

CardFormatter

-

This formatter is used for credit/debit card numbers. Can also be used for IBAN numbers. It groups the input value into chunks of four characters. The separator is an empty space as this is the most common option.

Note: character limiting is not supported in the formatter.

+

This formatter is used for credit/debit card numbers. Can also be used for IBAN numbers. It groups the input value into chunks of four characters. The separator is an empty space as this is the most common option.

Note: character limiting is not supported in the formatter.

Author

Linus Muema

diff --git a/form-builder/com.dsc.form_builder.format/-date-format/index.html b/form-builder/com.dsc.form_builder.format/-date-format/index.html index 8cabdd7..96b22c7 100644 --- a/form-builder/com.dsc.form_builder.format/-date-format/index.html +++ b/form-builder/com.dsc.form_builder.format/-date-format/index.html @@ -65,7 +65,7 @@

DateFormat

-

These are the formatting options for the DateFormatter class.

+

These are the formatting options for the DateFormatter class.

Author

Joy Kangangi

diff --git a/form-builder/com.dsc.form_builder.format/-date-formatter/index.html b/form-builder/com.dsc.form_builder.format/-date-formatter/index.html index ab79b16..06b4977 100644 --- a/form-builder/com.dsc.form_builder.format/-date-formatter/index.html +++ b/form-builder/com.dsc.form_builder.format/-date-formatter/index.html @@ -65,7 +65,7 @@

DateFormatter

-
class DateFormatter(dateFormat: DateFormat, separator: String) : Formatter

This formatter is used for date inputs. You need to specify a DateFormat and a separator. The formatting function places the separator in the respective index as the user types.

Note: character limiting is not supported in the formatter.

+
class DateFormatter(dateFormat: DateFormat, separator: String) : Formatter

This formatter is used for date inputs. You need to specify a DateFormat and a separator. The formatting function places the separator in the respective index as the user types.

Note: character limiting is not supported in the formatter.

Author

Linus Muema

diff --git a/form-builder/com.dsc.form_builder.format/-formatter/index.html b/form-builder/com.dsc.form_builder.format/-formatter/index.html index e5e8918..0f8fda1 100644 --- a/form-builder/com.dsc.form_builder.format/-formatter/index.html +++ b/form-builder/com.dsc.form_builder.format/-formatter/index.html @@ -65,7 +65,7 @@

Formatter

-
interface Formatter

These are the formatting interface for the TextFieldState. You can get the visual transformation to apply in your text input.

Inheritors

+
interface Formatter

These are the formatting interface for the TextFieldState. You can get the visual transformation to apply in your text input.

Author

Linus Muema

Inheritors

diff --git a/form-builder/com.dsc.form_builder/-base-state/index.html b/form-builder/com.dsc.form_builder/-base-state/index.html index e19f6ab..b63c7d7 100644 --- a/form-builder/com.dsc.form_builder/-base-state/index.html +++ b/form-builder/com.dsc.form_builder/-base-state/index.html @@ -65,7 +65,7 @@

BaseState

-
abstract class BaseState<T>(val initial: T, val name: String, val transform: Transform<T>?, val validators: List<Validators>)

This is the abstract base state that defines the basic behaviour for all form states.

Parameters

initial

the initial value/state of the class.

name

this is the name of the state. It is used to access the state when required in the form. It is also used when creating the class in the getData method of the FormState class.

transform

this function is used to change the data type in the field state. You can use it to convert the data in the field to your preferred type e.g String to Int

validators

this is the list of Validators that are used to validate the field state. By default most states will have an empty list. You can override this and provide your own list of validators.

Inheritors

+
abstract class BaseState<T>(val initial: T, val name: String, val transform: Transform<T>?, val validators: List<Validators>)

This is the abstract base state that defines the basic behaviour for all form states.

Author

Linus Muema

Parameters

initial

the initial value/state of the class.

name

this is the name of the state. It is used to access the state when required in the form. It is also used when creating the class in the getData method of the FormState class.

transform

this function is used to change the data type in the field state. You can use it to convert the data in the field to your preferred type e.g String to Int

validators

this is the list of Validators that are used to validate the field state. By default most states will have an empty list. You can override this and provide your own list of validators.

Inheritors

diff --git a/form-builder/com.dsc.form_builder/-choice-state/index.html b/form-builder/com.dsc.form_builder/-choice-state/index.html index d3af8ff..af34a89 100644 --- a/form-builder/com.dsc.form_builder/-choice-state/index.html +++ b/form-builder/com.dsc.form_builder/-choice-state/index.html @@ -65,7 +65,7 @@

ChoiceState

-
class ChoiceState(name: String, initial: String = "", validators: List<Validators> = listOf(), transform: Transform<String>? = null) : TextFieldState

ChoiceState is a class that holds the chosen value from a selection of choices. In this case the user is limited to a single choice. Only Validators.Required and Validators.Custom are supported for this class.

Parameters

initial

the initial value/state of the field. By default this is an empty string so none of the choices are selected.

name

the name of the state used to get an instance of the state from the form builder. using the FormBuilder.getState method.

transform

the transformation function used to transform the values of the state to a desired type. This function will be applied to the value before it is returned.

validators

a list of Validators applied to the state's value.

+
class ChoiceState(name: String, initial: String = "", validators: List<Validators> = listOf(), transform: Transform<String>? = null) : TextFieldState

ChoiceState is a class that holds the chosen value from a selection of choices. In this case the user is limited to a single choice. Only Validators.Required and Validators.Custom are supported for this class.

Author

Samwel Otieno

Parameters

initial

the initial value/state of the field. By default this is an empty string so none of the choices are selected.

name

the name of the state used to get an instance of the state from the form builder. using the FormBuilder.getState method.

transform

the transformation function used to transform the values of the state to a desired type. This function will be applied to the value before it is returned.

validators

a list of Validators applied to the state's value.

diff --git a/form-builder/com.dsc.form_builder/-form-state/index.html b/form-builder/com.dsc.form_builder/-form-state/index.html index c1b545d..32f710a 100644 --- a/form-builder/com.dsc.form_builder/-form-state/index.html +++ b/form-builder/com.dsc.form_builder/-form-state/index.html @@ -65,7 +65,7 @@

FormState

-
open class FormState<T : BaseState<*>>(val fields: List<T>)

This class represents the state of the whole form, i.e, the whole collection of fields. It is used to manage all of the states in terms of accessing data and validations.

Parameters

fields

this is a list of all fields in the form. We pass them as a parameter to the constructor for ease of management and access.

+
open class FormState<T : BaseState<*>>(val fields: List<T>)

This class represents the state of the whole form, i.e, the whole collection of fields. It is used to manage all of the states in terms of accessing data and validations.

Author

Linus Muema

Parameters

fields

this is a list of all fields in the form. We pass them as a parameter to the constructor for ease of management and access.

diff --git a/form-builder/com.dsc.form_builder/-select-state/index.html b/form-builder/com.dsc.form_builder/-select-state/index.html index b886b6e..a26a6c5 100644 --- a/form-builder/com.dsc.form_builder/-select-state/index.html +++ b/form-builder/com.dsc.form_builder/-select-state/index.html @@ -65,7 +65,7 @@

SelectState

-
class SelectState(name: String, initial: MutableList<String> = mutableListOf(), transform: Transform<MutableList<String>>? = null, validators: List<Validators> = listOf()) : BaseState<MutableList<String>>

SelectState is a state class that holds the selected values from a selection such as checkboxes. In this case the user can make several selections and the state will hold the selected values.

Parameters

initial

the initial value/state of the field. By default it is an empty list so no values are selected.

name

the name of the state used to get an instance of the state from the form builder. using the FormState.getState method.

transform

the transformation function used to transform the values of the state to a desired type. This function will be applied to the value before it is returned.

validators

a list of Validators applied to the state's value.

+
class SelectState(name: String, initial: MutableList<String> = mutableListOf(), transform: Transform<MutableList<String>>? = null, validators: List<Validators> = listOf()) : BaseState<MutableList<String>>

SelectState is a state class that holds the selected values from a selection such as checkboxes. In this case the user can make several selections and the state will hold the selected values.

Author

Samwel Otieno

Parameters

initial

the initial value/state of the field. By default it is an empty list so no values are selected.

name

the name of the state used to get an instance of the state from the form builder. using the FormState.getState method.

transform

the transformation function used to transform the values of the state to a desired type. This function will be applied to the value before it is returned.

validators

a list of Validators applied to the state's value.

diff --git a/form-builder/com.dsc.form_builder/-text-field-state/-text-field-state.html b/form-builder/com.dsc.form_builder/-text-field-state/-text-field-state.html index ff6611a..b5b6a0a 100644 --- a/form-builder/com.dsc.form_builder/-text-field-state/-text-field-state.html +++ b/form-builder/com.dsc.form_builder/-text-field-state/-text-field-state.html @@ -66,7 +66,7 @@

TextFieldState

-
constructor(name: String, initial: String = "", transform: Transform<String>? = null, validators: List<Validators> = listOf(), formatter: Formatter? = null)

Parameters

name

The name of the field used to access the state when required in the form

initial

The initial value/state of the field. By default it is an empty string.

formatter

The formatting option for the field.

transform

The function used to change the String data type on the text field to a suitable type e.g String to Int.

validators

This is the list of Validators that are used to validate the field state. By default the field states will have an empty list. You can override this and provide your own list of validators.

+
constructor(name: String, initial: String = "", transform: Transform<String>? = null, validators: List<Validators> = listOf(), formatter: Formatter? = null)

Parameters

name

The name of the field used to access the state when required in the form

initial

The initial value/state of the field. By default it is an empty string.

transform

The function used to change the String data type on the text field to a suitable type e.g String to Int.

validators

This is the list of Validators that are used to validate the field state. By default the field states will have an empty list. You can override this and provide your own list of validators.

formatter

The formatting option for the field.

TextFieldState

-
open class TextFieldState(name: String, initial: String = "", transform: Transform<String>? = null, validators: List<Validators> = listOf(), formatter: Formatter? = null) : BaseState<String>

This class represents the state of a single form field. It overrides members from BaseState. It manages validations for individual form fields inputs (field states) for example email, passwords, etc. It also helps keep track of form field input changes and pass updates to the onValueChange callback.

Parameters

name

The name of the field used to access the state when required in the form

initial

The initial value/state of the field. By default it is an empty string.

formatter

The formatting option for the field.

transform

The function used to change the String data type on the text field to a suitable type e.g String to Int.

validators

This is the list of Validators that are used to validate the field state. By default the field states will have an empty list. You can override this and provide your own list of validators.

Inheritors

+
open class TextFieldState(name: String, initial: String = "", transform: Transform<String>? = null, validators: List<Validators> = listOf(), formatter: Formatter? = null) : BaseState<String>

This class represents the state of a single form field. It overrides members from BaseState. It manages validations for individual form fields inputs (field states) for example email, passwords, etc. It also helps keep track of form field input changes and pass updates to the onValueChange callback.

Author

Joy Kangangi

Parameters

name

The name of the field used to access the state when required in the form

initial

The initial value/state of the field. By default it is an empty string.

transform

The function used to change the String data type on the text field to a suitable type e.g String to Int.

validators

This is the list of Validators that are used to validate the field state. By default the field states will have an empty list. You can override this and provide your own list of validators.

formatter

The formatting option for the field.

Inheritors

diff --git a/form-builder/com.dsc.form_builder/-transform/index.html b/form-builder/com.dsc.form_builder/-transform/index.html index 13568c2..3fe554f 100644 --- a/form-builder/com.dsc.form_builder/-transform/index.html +++ b/form-builder/com.dsc.form_builder/-transform/index.html @@ -65,7 +65,7 @@

Transform

-
fun interface Transform<T>

This interface is used to allow change of data types to a suitable type when necessary.

+
fun interface Transform<T>

This interface is used to allow change of data types to a suitable type when necessary.

Author

Joy Kangangi

diff --git a/form-builder/com.dsc.form_builder/-validators/index.html b/form-builder/com.dsc.form_builder/-validators/index.html index 7038c92..e217d2e 100644 --- a/form-builder/com.dsc.form_builder/-validators/index.html +++ b/form-builder/com.dsc.form_builder/-validators/index.html @@ -65,7 +65,7 @@

Validators

-
sealed interface Validators

These are the types of validators available in the form builder library. They all have the message parameter to allow the developer to set their own custom error message.

Inheritors

+
sealed interface Validators

These are the types of validators available in the form builder library. They all have the message parameter to allow the developer to set their own custom error message.

Author

Linus Muema

Inheritors