setError

fun setError(errorText: String?)

Sets the error text that appears beneath the input field. Setting errorText to null or blank will hide the error. Must be used rather than setting from inputLayout directly for counter error support and box stroke styling support.