add Field

fun addField(    fieldName: String,     view: View,     rules: List<BaseRule>,     action: (String) -> Unit? = null)

Method to add FormField

Parameters

fieldName

name of the FormField, used for getting values

view

the view of field, right now supported View is : EditText, TextInputLayout, Spinner, RadioGroup, and CheckBox

rules

list of rules of for the View

action

custom action to do when FormField is not validated, by default null

Sources

Link copied to clipboard