onValueChanged

fun onValueChanged(index: Int, text: String): Int

Filter invalid values and set the value of the fields to the entered text, one character per field starting from index. If the length of the filtered input is the same as the OTP we're collecting, set the full input value regardless of the starting index passed as parameter.

Return

the number of fields that had their values set