add
Form
Field
abstract fun addFormField( fieldName: String, view: View, rules: List<BaseRule>, action: (String) -> Unit? = null)
Content copied to clipboard
Method to add field to the form
Parameters
fieldName
name used for getting variable later on
view
the view that need to be implemented with validation
rules
list of rules to be implemented
action
what action to invoked when the validation is not met